[or-cvs] r23354: {arm} fix: minor revisions thanks to a new version of pylint (in arm/trunk: . src/interface src/interface/graphing src/util)

Damian Johnson atagar1 at gmail.com
Thu Sep 30 17:05:42 UTC 2010


Author: atagar
Date: 2010-09-30 17:05:42 +0000 (Thu, 30 Sep 2010)
New Revision: 23354

Modified:
   arm/trunk/TODO
   arm/trunk/src/interface/graphing/bandwidthStats.py
   arm/trunk/src/interface/graphing/connStats.py
   arm/trunk/src/interface/graphing/psStats.py
   arm/trunk/src/interface/logPanel.py
   arm/trunk/src/util/conf.py
   arm/trunk/src/util/connections.py
   arm/trunk/src/util/hostnames.py
   arm/trunk/src/util/panel.py
   arm/trunk/src/util/sysTools.py
   arm/trunk/src/util/torTools.py
   arm/trunk/src/util/uiTools.py
Log:
fix: minor revisions thanks to a new version of pylint



Modified: arm/trunk/TODO
===================================================================
--- arm/trunk/TODO	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/TODO	2010-09-30 17:05:42 UTC (rev 23354)
@@ -23,7 +23,7 @@
     * check performance of this version vs last version (general screen refresh
         times)
     * stress test under debug level and debug level with large log file
-    * pylint --indent-string="  " --disable-msg-cat=CR interface/foo.py | less
+    * pylint --indent-string="  " --disable=C,R interface/foo.py | less
     * double check __init__.py and README for changes
 
 - Roadmap for version 1.3.8

Modified: arm/trunk/src/interface/graphing/bandwidthStats.py
===================================================================
--- arm/trunk/src/interface/graphing/bandwidthStats.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/interface/graphing/bandwidthStats.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -5,7 +5,7 @@
 
 import time
 
-import graphPanel
+from interface.graphing import graphPanel
 from util import log, sysTools, torTools, uiTools
 
 DL_COLOR, UL_COLOR = "green", "cyan"

Modified: arm/trunk/src/interface/graphing/connStats.py
===================================================================
--- arm/trunk/src/interface/graphing/connStats.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/interface/graphing/connStats.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -2,7 +2,7 @@
 Tracks stats concerning tor's current connections.
 """
 
-import graphPanel
+from interface.graphing import graphPanel
 from util import connections, torTools
 
 class ConnStats(graphPanel.GraphStats):

Modified: arm/trunk/src/interface/graphing/psStats.py
===================================================================
--- arm/trunk/src/interface/graphing/psStats.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/interface/graphing/psStats.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -3,7 +3,7 @@
 graph. By default this provides the cpu and memory usage of the tor process.
 """
 
-import graphPanel
+from interface.graphing import graphPanel
 from util import conf, log, sysTools, torTools, uiTools
 
 # number of subsequent failed queries before giving up

Modified: arm/trunk/src/interface/logPanel.py
===================================================================
--- arm/trunk/src/interface/logPanel.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/interface/logPanel.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -52,9 +52,17 @@
 # [NOTICE] We stalled too much while trying to write 125 bytes to address [scrubbed]...
 # [NOTICE] Attempt by %s to open a stream from unknown relay. Closing.
 # [WARN] You specified a server "Amunet8" by name, but this name is not registered
+# [ARM_DEBUG] refresh rate:
+# [ARM_DEBUG] system call: ps
+# [ARM_DEBUG] system call: netstat
+# [ARM_DEBUG] GETINFO accounting/
 COMMON_LOG_MESSAGES = ["We stalled too much while trying to write",
                        "Attempt by ",
-                       "You specified a server "]
+                       "You specified a server ",
+                       "refresh rate: ",
+                       "system call: ps",
+                       "system call: netstat",
+                       "GETINFO accounting/"]
 
 # messages with a dynamic beginning (searches the whole string instead)
 # [WARN] 4 unknown, 1 missing key, 3 good, 0 bad, 1 no signature, 4 required

Modified: arm/trunk/src/util/conf.py
===================================================================
--- arm/trunk/src/util/conf.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/util/conf.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -17,7 +17,7 @@
 import os
 import threading
 
-import log
+from util import log
 
 CONFS = {}  # mapping of identifier to singleton instances of configs
 CONFIG = {"log.configEntryNotFound": None,

Modified: arm/trunk/src/util/connections.py
===================================================================
--- arm/trunk/src/util/connections.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/util/connections.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -15,8 +15,7 @@
 import time
 import threading
 
-import log
-import sysTools
+from util import log, sysTools
 
 # enums for connection resolution utilities
 CMD_NETSTAT, CMD_SS, CMD_LSOF = range(1, 4)

Modified: arm/trunk/src/util/hostnames.py
===================================================================
--- arm/trunk/src/util/hostnames.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/util/hostnames.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -32,8 +32,7 @@
 import Queue
 import distutils.sysconfig
 
-import log
-import sysTools
+from util import log, sysTools
 
 RESOLVER = None                       # hostname resolver (service is stopped if None)
 RESOLVER_LOCK = threading.RLock()     # regulates assignment to the RESOLVER

Modified: arm/trunk/src/util/panel.py
===================================================================
--- arm/trunk/src/util/panel.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/util/panel.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -7,7 +7,7 @@
 import curses
 from threading import RLock
 
-import log, uiTools
+from util import log, uiTools
 
 # global ui lock governing all panel instances (curses isn't thread save and 
 # concurrency bugs produce especially sinister glitches)
@@ -78,7 +78,7 @@
     Provides panel's identifier.
     """
     
-    return self.name
+    return self.panelName
   
   def getParent(self):
     """
@@ -423,7 +423,7 @@
       self.win = self.parent.subwin(newHeight, newWidth, self.top, 0)
       
       # note: doing this log before setting win produces an infinite loop
-      msg = "recreating panel '%s' with the dimensions of %i/%i" % (self.panelName, newHeight, newWidth)
+      msg = "recreating panel '%s' with the dimensions of %i/%i" % (self.getName(), newHeight, newWidth)
       log.log(CONFIG["log.panelRecreated"], msg)
     return recreate
   

Modified: arm/trunk/src/util/sysTools.py
===================================================================
--- arm/trunk/src/util/sysTools.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/util/sysTools.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -6,7 +6,7 @@
 import time
 import threading
 
-import log
+from util import log
 
 # mapping of commands to if they're available or not
 CMD_AVAILABLE_CACHE = {}
@@ -75,7 +75,7 @@
   
   # caching functionality (fetching and trimming)
   if cacheAge > 0:
-    global CALL_CACHE, CONFIG
+    global CALL_CACHE
     
     # keeps consistency that we never use entries over a minute old (these
     # results are 'dirty' and might be trimmed at any time)

Modified: arm/trunk/src/util/torTools.py
===================================================================
--- arm/trunk/src/util/torTools.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/util/torTools.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -17,8 +17,7 @@
 
 from TorCtl import TorCtl, TorUtil
 
-import log
-import sysTools
+from util import log, sysTools
 
 # enums for tor's controller state:
 # TOR_INIT - attached to a new controller or restart/sighup signal received

Modified: arm/trunk/src/util/uiTools.py
===================================================================
--- arm/trunk/src/util/uiTools.py	2010-09-30 15:58:15 UTC (rev 23353)
+++ arm/trunk/src/util/uiTools.py	2010-09-30 17:05:42 UTC (rev 23354)
@@ -8,7 +8,7 @@
 import sys
 import curses
 
-import log
+from util import log
 
 # colors curses can handle
 COLOR_LIST = {"red": curses.COLOR_RED,        "green": curses.COLOR_GREEN,



More information about the tor-commits mailing list