bgribble/mfp

Copy-paste doesn't always remake connections correctly

Closed this issue · 2 comments

Copy-pasting a connected network of processors doesn't always preserve the connections in the pasted network.

This is a result of paste throwing an exception:

 Traceback (most recent call last):
  File "/home/grib/devel/mfp/wafbuild/virtual/lib/python2.7/dist-packages/mfp-0.05_git_03405a9-py2.7.egg/mfp/rpc/rpc_wrapper.py", line 150, in call_locally
    rv = meth(*args, **kwargs)
  File "/home/grib/devel/mfp/wafbuild/virtual/lib/python2.7/dist-packages/mfp-0.05_git_03405a9-py2.7.egg/mfp/rpc/rpc_wrapper.py", line 15, in inner
    return worker_proc(self, *args, **kwargs)
  File "/home/grib/devel/mfp/wafbuild/virtual/lib/python2.7/dist-packages/mfp-0.05_git_03405a9-py2.7.egg/mfp/mfp_command.py", line 229, in clipboard_paste
    return MFPApp().clipboard_paste(json_txt, patch, scope, mode)
  File "/home/grib/devel/mfp/wafbuild/virtual/lib/python2.7/dist-packages/mfp-0.05_git_03405a9-py2.7.egg/mfp/mfp_app.py", line 600, in clipboard_paste
    idmap = patch.json_unpack_objects(jdata, scope)
  File "/home/grib/devel/mfp/wafbuild/virtual/lib/python2.7/dist-packages/mfp-0.05_git_03405a9-py2.7.egg/mfp/patch_json.py", line 137, in json_unpack_objects
    defscope = data.get('scopes').get('__patch__')
AttributeError: 'NoneType' object has no attribute 'get'

Above commits fix this issue. Closing.