Skip to content

Commit

Permalink
Merge pull request #85 from chrisjbillington/functionrunner-deseriali…
Browse files Browse the repository at this point in the history
…se-fix

Fix bug in FunctionRunner function deserialisation
  • Loading branch information
dihm authored Nov 15, 2021
2 parents 1b66b81 + 9dc2162 commit ef1e9b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions labscript_devices/FunctionRunner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def deserialise_function(
"""Deserialise a function that was serialised by serialise_function. Optional
__name__ and __file__ arguments set those attributes in the namespace that the
function will be defined."""
if isinstance(name, bytes):
name = name.decode('utf8')
args = deserialise(args)
kwargs = deserialise(kwargs)
code = compile(source, '<string>', 'exec', dont_inherit=True,)
Expand Down

0 comments on commit ef1e9b8

Please sign in to comment.