Skip to content

Commit ef1e9b8

Browse files
authored
Merge pull request #85 from chrisjbillington/functionrunner-deserialise-fix
Fix bug in FunctionRunner function deserialisation
2 parents 1b66b81 + 9dc2162 commit ef1e9b8

File tree

1 file changed

+2
-0
lines changed
  • labscript_devices/FunctionRunner

1 file changed

+2
-0
lines changed

labscript_devices/FunctionRunner/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def deserialise_function(
5252
"""Deserialise a function that was serialised by serialise_function. Optional
5353
__name__ and __file__ arguments set those attributes in the namespace that the
5454
function will be defined."""
55+
if isinstance(name, bytes):
56+
name = name.decode('utf8')
5557
args = deserialise(args)
5658
kwargs = deserialise(kwargs)
5759
code = compile(source, '<string>', 'exec', dont_inherit=True,)

0 commit comments

Comments
 (0)