aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http_auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'netlib/http_auth.py')
-rw-r--r--netlib/http_auth.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/netlib/http_auth.py b/netlib/http_auth.py
index 948d503a..69bee5c1 100644
--- a/netlib/http_auth.py
+++ b/netlib/http_auth.py
@@ -131,17 +131,16 @@ class AuthAction(Action):
authenticator = BasicProxyAuth(passman, "mitmproxy")
setattr(namespace, self.dest, authenticator)
- def getPasswordManager(self, s):
- """
- returns the password manager
- """
+ def getPasswordManager(self, s): # pragma: nocover
raise NotImplementedError()
class SingleuserAuthAction(AuthAction):
def getPasswordManager(self, s):
if len(s.split(':')) != 2:
- raise ArgumentTypeError("Invalid single-user specification. Please use the format username:password")
+ raise ArgumentTypeError(
+ "Invalid single-user specification. Please use the format username:password"
+ )
username, password = s.split(':')
return PassManSingleUser(username, password)
@@ -154,4 +153,5 @@ class NonanonymousAuthAction(AuthAction):
class HtpasswdAuthAction(AuthAction):
def getPasswordManager(self, s):
with open(s, "r") as f:
- return PassManHtpasswd(f) \ No newline at end of file
+ return PassManHtpasswd(f)
+