diff --git a/python/datafed_pkg/datafed/CLI.py b/python/datafed_pkg/datafed/CLI.py index a72bd84f8..b863c9084 100644 --- a/python/datafed_pkg/datafed/CLI.py +++ b/python/datafed_pkg/datafed/CLI.py @@ -2197,6 +2197,7 @@ def _setup( manual authentication. """ + cfg_dir = _capi.cfg.get("client_cfg_dir") if cfg_dir is None: raise Exception("Client configuration directory is not configured") diff --git a/python/datafed_pkg/datafed/CommandLib.py b/python/datafed_pkg/datafed/CommandLib.py index da8baad01..49346dcc3 100644 --- a/python/datafed_pkg/datafed/CommandLib.py +++ b/python/datafed_pkg/datafed/CommandLib.py @@ -69,7 +69,7 @@ class methods and replies are (currently) returned as Google Protobuf message ob def __init__(self, opts={}): self._initialize(opts) - def _initialize(self, opts={}): + def _initialize(self, opts=None): if not isinstance(opts, dict): raise Exception("CommandLib API options parameter must be a dictionary.") @@ -2366,7 +2366,10 @@ def setupAllCredentials(self, overwrite=True): self.setupServerCredentials(overwrite) self.setupCredentials(overwrite) - def setupClientConfigFile(self, opts={}, overwrite=True): + def setupClientConfigFile(self, opts=None, overwrite=True): + if not isinstance(opts, dict): + raise Exception("CommandLib API options parameter must be a dictionary.") + write = False if overwrite: write = True