RadonMetrics/RawMetricsDialog.py

changeset 13
22bc345844e7
parent 11
de8cadbd6a41
child 14
5f206edea27e
--- a/RadonMetrics/RawMetricsDialog.py	Sat Sep 19 11:54:33 2015 +0200
+++ b/RadonMetrics/RawMetricsDialog.py	Sat Sep 19 18:24:07 2015 +0200
@@ -10,7 +10,7 @@
 from __future__ import unicode_literals
 
 try:
-    str = unicode       # __IGNORE_EXCEPTION __IGNORE_WARNING__
+    str = unicode       # __IGNORE_EXCEPTION__ __IGNORE_WARNING__
 except NameError:
     pass
 
@@ -119,7 +119,7 @@
         data.append("{0:3.0%}".format(
             values["comments"] / (float(values["sloc"]) or 1)))
         data.append("{0:3.0%}".format(
-            (values["comments"] + values["multi"]) / 
+            (values["comments"] + values["multi"]) /
             (float(values["loc"]) or 1)))
         itm = QTreeWidgetItem(self.resultList, data)
         for col in range(1, 10):
@@ -179,6 +179,8 @@
             the code metrics for
         @type str or list of str
         """
+        self.__errorItem = None
+        self.resultList.clear()
         self.cancelled = False
         self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
         self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True)
@@ -475,7 +477,4 @@
                 fileList = \
                     [f for f in fileList if not fnmatch.fnmatch(f, filter)]
         
-        self.__errorItem = None
-        self.resultList.clear()
-        self.cancelled = False
         self.start(fileList)

eric ide

mercurial