t1g0r / npyscreen

Other
0 stars 0 forks source link

'weakref' is not defined #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I updated to npyscreen-4.8.0 recently, and it looks like it's broken.
This code:

    import npyscreen

    class Test(npyscreen.NPSAppManaged):
        def onStart(self):
            form = npyscreen.ActionForm()
            self.registerForm("MAIN", form)

    if __name__ == '__main__':
        Test().run()

produces this exception:

      File "npyscreen-4.8.0-py2.7.egg/npyscreen/apNPSApplication.py", line 30, in run
        return npyssafewrapper.wrapper(self.__remove_argument_call_main)
      File "npyscreen-4.8.0-py2.7.egg/npyscreen/npyssafewrapper.py", line 41, in wrapper
        wrapper_no_fork(call_function)
      File "npyscreen-4.8.0-py2.7.egg/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
        return_code = call_function(_SCREEN)
      File "npyscreen-4.8.0-py2.7.egg/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
        return self.main()
      File "npyscreen-4.8.0-py2.7.egg/npyscreen/apNPSApplicationManaged.py", line 172, in main
        self._THISFORM.edit()
      File "npyscreen-4.8.0-py2.7.egg/npyscreen/fmActionForm.py", line 62, in edit
        self.while_editing(weakref.proxy(self._widgets__[self.editw]))
    NameError: global name 'weakref' is not defined

Original issue reported on code.google.com by wiggi...@gmail.com on 17 Feb 2015 at 3:47

GoogleCodeExporter commented 9 years ago
Quite right.  Bug fix uploaded.

Original comment by nicholas.cole on 18 Feb 2015 at 4:26