Commits

Rob Lanphier committed b9218cb

Getting rid of deprecation warnings on Exception.message

  • Participants
  • Parent commits 8e00786

Comments (0)

Files changed (2)

jsonwidget/pinot.py

 class PinotExit(Exception):
     pass
 
+
 class PinotAlert(Exception):
     pass
 
                         try:
                             self.view.keypress(size, key)
                         except PinotAlert as inst:
-                            self.display_notification(inst.message)
+                            self.display_notification(str(inst))
 
     def on_init(self):
         pass

jsonwidget/termedit.py

                 treenode.change_key(text)
             except TreeWidgetError as inst:
                 self.set_edit_text(key)
-                raise PinotAlert(inst.message)
+                raise PinotAlert(str(inst))
 
     def get_value_text(self):
         return self.get_node().get_parent().get_value().get_key()