Skip to content

Commit

Permalink
handle atomic/collection return from callprint; close databio#84
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Mar 19, 2019
1 parent e488995 commit c55e4bd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pypiper/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
import sys
import time

if sys.version_info < (3, 3):
from collections import Iterable
else:
from collections.abc import Iterable

from attmap import AttMapEcho
from .exceptions import PipelineHalt, SubprocessError
from .flags import *
Expand Down Expand Up @@ -719,9 +724,10 @@ def call_follow():

if isinstance(cmd, list): # Handle command lists
for cmd_i in cmd:
list_ret, list_maxmem = \
list_ret, maxmem = \
self.callprint(cmd_i, nofail, container)
local_maxmem = max(local_maxmem, list_maxmem)
maxmem = max(maxmem) if isinstance(maxmem, Iterable) else maxmem
local_maxmem = max(local_maxmem, maxmem)
process_return_code = max(process_return_code, list_ret)

else: # Single command (most common)
Expand Down

0 comments on commit c55e4bd

Please sign in to comment.