aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http/authentication.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-01 11:12:10 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-01 11:12:10 +1200
commit44fdcb4b8291a5be6738f32d6fde307af3f2034e (patch)
tree64a4a2cfa6295d0a367d5484a0d86bc5e22ab779 /netlib/http/authentication.py
parentbe644453649f0b0cf84822ad9de566b7dc744873 (diff)
downloadmitmproxy-44fdcb4b8291a5be6738f32d6fde307af3f2034e.tar.gz
mitmproxy-44fdcb4b8291a5be6738f32d6fde307af3f2034e.tar.bz2
mitmproxy-44fdcb4b8291a5be6738f32d6fde307af3f2034e.zip
Reorganise netlib imports according to Google Style Guide
Diffstat (limited to 'netlib/http/authentication.py')
-rw-r--r--netlib/http/authentication.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/netlib/http/authentication.py b/netlib/http/authentication.py
index 6db70fdd..38ea46d6 100644
--- a/netlib/http/authentication.py
+++ b/netlib/http/authentication.py
@@ -1,5 +1,5 @@
from __future__ import (absolute_import, print_function, division)
-from argparse import Action, ArgumentTypeError
+import argparse
import binascii
@@ -124,7 +124,7 @@ class PassManSingleUser(PassMan):
return self.username == username and self.password == password_token
-class AuthAction(Action):
+class AuthAction(argparse.Action):
"""
Helper class to allow seamless integration int argparse. Example usage:
@@ -148,7 +148,7 @@ class SingleuserAuthAction(AuthAction):
def getPasswordManager(self, s):
if len(s.split(':')) != 2:
- raise ArgumentTypeError(
+ raise argparse.ArgumentTypeError(
"Invalid single-user specification. Please use the format username:password"
)
username, password = s.split(':')