Open amigrave opened 7 years ago
The following code actually doesn't work...
from chopsticks.tunnel import SSHTunnel def deco(fn): return fn @deco def do_it(): return 'done' tunnel = SSHTunnel('root@192.168.56.103') print(tunnel.call(do_it))
... because when building the source code to send, serialise_func() will append sub dependency functions below the original callable, hence when the code is remotely unpickled and executed, the decorator function is not yet declared.
serialise_func()
The following code actually doesn't work...
... because when building the source code to send,
serialise_func()
will append sub dependency functions below the original callable, hence when the code is remotely unpickled and executed, the decorator function is not yet declared.