Skip to content

Commit

Permalink
RF: avoid code duplication, use os.path.join over all components of t…
Browse files Browse the repository at this point in the history
…he path
  • Loading branch information
yarikoptic committed Sep 20, 2019
1 parent 67b7250 commit 85390c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions NDATools/clientscripts/vtcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ def configure(args):
# create a new config file in user's home directory if one does not exist

NDATools.Utils.logging.getLogger().setLevel(logging.DEBUG)
if os.path.isfile(os.path.join(os.path.expanduser('~'), '.NDATools/settings.cfg')):
config = ClientConfiguration(os.path.join(os.path.expanduser('~'), '.NDATools/settings.cfg'), args.username,
config_file = os.path.join(os.path.expanduser('~'), '.NDATools', 'settings.cfg')
if os.path.isfile(config_file):
config = ClientConfiguration(config_file, args.username,
args.password, args.accessKey, args.secretKey)
else:
config = ClientConfiguration('clientscripts/config/settings.cfg', args.username, args.password, args.accessKey,
Expand Down

0 comments on commit 85390c3

Please sign in to comment.