Skip to content

Commit 91e797e

Browse files
authored
Merge pull request #1077 from fls-bioinformatics-core/add_command-set-retval-for-None
'add_command' decorator handle 'None' from wrapped command function
2 parents 504a6b6 + bcac4cb commit 91e797e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

auto_process_ngs/decorators.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def wrapped_func(*args,**kws):
8585
ret = 1
8686
else:
8787
print("[%s] %s: finished" % (timestamp(),name))
88+
if ret is None:
89+
# Assume success
90+
ret = 0
8891
return ret
8992
def timestamp():
9093
# Return the current time

0 commit comments

Comments
 (0)