Skip to content

Commit

Permalink
Handle empty args
Browse files Browse the repository at this point in the history
  • Loading branch information
bud42 committed Mar 3, 2020
1 parent f803319 commit c33f0b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dax/dax_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ def load_module_record(self, module, project):
dax_rec['filepath'] = rc_rec[file_key]

# Parse arguments
if rc_rec[key_prefix + '_args']:
rlist = rc_rec[key_prefix + '_args'].strip().split('\r\n')
args_key = key_prefix + '_args'
if rc_rec[args_key] and len(rc_rec[args_key]) > 0:
rlist = rc_rec[args_key].strip().split('\r\n')
rdict = {}
for arg in rlist:
key, val = arg.split(':', 1)
Expand Down
7 changes: 4 additions & 3 deletions dax/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -1348,9 +1348,10 @@ def complete_task(self):
# Move output file
src = self.outlog_path()
dst = self.upload_outlog_dir()
mkdirp(dst)
LOGGER.debug('moving outlog file from %s to %s' % (src, dst))
shutil.move(src, dst)
if os.path.exists(src):
mkdirp(dst)
LOGGER.debug('moving outlog file from %s to %s' % (src, dst))
shutil.move(src, dst)

# Touch file for dax_upload to check
create_flag(os.path.join(RESULTS_DIR, self.assessor_label,
Expand Down

0 comments on commit c33f0b5

Please sign in to comment.