Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyp3
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,8 @@ class Pyp(object):
@type iterables: list<str>
'''
out = []
if '__iter__' in dir(iterables) or type(iterables) in [list, PowerPipeList,tuple,PypList]:
safe_iterables = [list, PowerPipeList,tuple,PypList]
if type(iterables) in safe_iterables:
#expand history objects
if [x for x in iterables if type(x) in [HistoryObject]]:

Expand All @@ -1363,7 +1364,7 @@ class Pyp(object):
iterables = expanded_iterables
#if [x for x in iterables if type(x) in [str, PypStr,HistoryObject,type,int,float]]:

if [x for x in iterables if type(x) not in [list,PowerPipeList,tuple,PypList]]: #str,int,etc
if [x for x in iterables if type(x) not in safe_iterables]: #str,int,etc
out = out + iterables #add the lists and be done

else:
Expand Down