Permalink
Browse files

refactoring

  • Loading branch information...
tmf16 committed Mar 9, 2012
1 parent 0ee1e7c commit 39171984181bb73a79a76bc05717f5675f4a89c0
Showing with 9 additions and 10 deletions.
  1. +9 −10 pycheck/pycheck.py
View
@@ -18,7 +18,7 @@
import gtk
-def msg(text):
+def msgbox(text):
dlg = gtk.MessageDialog(None,
gtk.DIALOG_MODAL,
gtk.MESSAGE_WARNING,
@@ -154,27 +154,26 @@ def on_action_pycheck_activate(self, action):
doc = self._window.get_active_document()
if not doc.get_language():
- msg('not a python file.')
+ msgbox('not a python file.')
return
if doc.get_language().get_id().lower() != "python":
- msg('not a python file.')
+ msgbox('not a python file.')
return
self._window.get_bottom_panel().set_property("visible", True)
self._window.get_bottom_panel().activate_item(self._panel)
- try:
- self._action_group.set_sensitive(doc != None)
- self._results[doc] = PyCheckListStore()
- self._results[doc].clear()
- self._panel.set_model(self._results[doc])
+ self._action_group.set_sensitive(doc != None)
+ self._results[doc] = PyCheckListStore()
+ self._results[doc].clear()
+ self._panel.set_model(self._results[doc])
+ try:
self._check(doc)
except:
s = traceback.format_exc(sys.exc_info()[2])
- msg(s)
- return
+ msgbox(s)
def _check(self, doc):
uri = doc.get_uri()

0 comments on commit 3917198

Please sign in to comment.