summaryrefslogtreecommitdiff
path: root/docker/auth
diff options
context:
space:
mode:
authorabanna <alexanderbanna@gmail.com>2014-12-18 09:37:45 -0800
committerabanna <alexanderbanna@gmail.com>2014-12-18 10:21:02 -0800
commit6dfae8bcd2dda8a4e4ebd901db4013f8df8bdffb (patch)
tree186bd97d613243f5f73633b543f7b90ef4819e37 /docker/auth
parentd3cf87493850e806a99cbaa16307664a71769f7d (diff)
downloaddocker-py-6dfae8bcd2dda8a4e4ebd901db4013f8df8bdffb.tar.gz
updated parameter name to make more sense.
Diffstat (limited to 'docker/auth')
-rw-r--r--docker/auth/auth.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index 91508bd..fb41fa9 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -117,18 +117,16 @@ def encode_full_header(auth):
return encode_header({'configs': auth})
-def load_config(root=None):
+def load_config(config_path=None):
"""
Loads authentication data from a Docker configuration file in the given
- root directory.
-
- If root passed config_file is set to new path.
+ root directory or if config_path is passed use given path.
"""
conf = {}
data = None
- config_file = root or os.path.join(os.environ.get('HOME', '.'),
- DOCKER_CONFIG_FILENAME)
+ config_file = config_path or os.path.join(os.environ.get('HOME', '.'),
+ DOCKER_CONFIG_FILENAME)
# if config path doesn't exist return empty config
if not os.path.exists(config_file):