1. Arne Babenhauserheide
  2. pyrad


dr...@bab  committed 907d39b

Fix: crashed when killed from commandline.

  • Participants
  • Parent commits f613ef8
  • Branches default

Comments (0)

Files changed (2)

File .bugs/bugs

View file
 tray icon, maybe to fix the logout crash                     | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:293b1816684a65819949e22404f6459d61cdd164, time:1353145473.39
-pyrad --quit and --kill die                                  | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:2b43fdb728fe6dc0787d621b39543dfbc53945ab, time:1354073104.93
+pyrad --quit and --kill die                                  | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:2b43fdb728fe6dc0787d621b39543dfbc53945ab, time:1354073104.93
 crashes on logout                                            | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:e5f978936418c58cc3db5590c1efbf0a64592fcc, time:1353145451.8

File pyrad.py

View file
     def quit(self):
         """Quit the program: close the rad, then quit."""
-        self.close()
-        del self.rad
+        try:
+            self.close()
+            del self.rad
+        except AttributeError: 
+            # quit called on the commandline, so the rad does not
+            # exist for this instance.
+            pass
         super(KUniqueCaller, self).quit()
     def close(self):
         """Slot for closing the rad."""
     def newInstance(self):
         """Get a new instance -> in reality only check if there's already an instance and tell the GUI to run."""