Skip to content

Commit

Permalink
Address static code analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSBrown committed Nov 30, 2023
1 parent 3e08ab6 commit 8451423
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/datafed_pkg/datafed/CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
7 changes: 5 additions & 2 deletions python/datafed_pkg/datafed/CommandLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8451423

Please sign in to comment.