aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http_auth.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-12-08 01:39:50 +0100
committerMaximilian Hils <git@maximilianhils.com>2013-12-08 01:39:50 +0100
commit64139a1e7ed32f5d995c8fdea0d82c2d2d44f195 (patch)
tree57f82ac4c4be727098a577f82e9d6a33a4c41e95 /netlib/http_auth.py
parent390f2a46c920ee332d758d6c46999b5147e0b30b (diff)
parent7213f86d49960a625643fb6179e6a3731b16d462 (diff)
downloadmitmproxy-64139a1e7ed32f5d995c8fdea0d82c2d2d44f195.tar.gz
mitmproxy-64139a1e7ed32f5d995c8fdea0d82c2d2d44f195.tar.bz2
mitmproxy-64139a1e7ed32f5d995c8fdea0d82c2d2d44f195.zip
merge origin/master
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)
+