Skip to content

Commit 275f369

Browse files
bugfix2: When expanding globals, don't make axes for values that are exceptions.
Should fix issue labscript-suite#64
1 parent cdfae0e commit 275f369

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ def expand_globals(sequence_globals, evaled_globals, expansion_config = None, re
519519
for global_name in expansions:
520520
if expansions[global_name] == zip_key:
521521
value = values[global_name]
522+
if isinstance(value, Exception):
523+
continue
522524
if not zip_key:
523525
# Wrap up non-iterating globals (with zip_key = '') in a
524526
# one-element list. When zipped and then outer product'ed,
@@ -538,6 +540,8 @@ def expand_globals(sequence_globals, evaled_globals, expansion_config = None, re
538540
for global_name in expansions:
539541
if expansions[global_name] == 'outer':
540542
value = values[global_name]
543+
if isinstance(value, Exception):
544+
continue
541545
axis = [value]
542546
axis = list(zip(*axis))
543547
dimensions['outer '+global_name] = len(axis)

0 commit comments

Comments
 (0)