Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactoring

  • Loading branch information...
commit 39171984181bb73a79a76bc05717f5675f4a89c0 1 parent 0ee1e7c
@tmf16 authored
Showing with 9 additions and 10 deletions.
  1. +9 −10 pycheck/pycheck.py
View
19 pycheck/pycheck.py
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.