[open-ils-commits] r858 - constrictor/trunk (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Apr 8 14:04:15 EDT 2010


Author: erickson
Date: 2010-04-08 14:04:11 -0400 (Thu, 08 Apr 2010)
New Revision: 858

Modified:
   constrictor/trunk/constrictor.py
Log:
python style tweaks

Modified: constrictor/trunk/constrictor.py
===================================================================
--- constrictor/trunk/constrictor.py	2010-04-08 18:04:11 UTC (rev 857)
+++ constrictor/trunk/constrictor.py	2010-04-08 18:04:11 UTC (rev 858)
@@ -24,7 +24,7 @@
 
 props = None
 props_filename = PROPS_FILENAME
-droneController = None
+drone_controller = None
 
 def usage():
     print '''
@@ -85,9 +85,9 @@
 
 
 def onThreadsComplete(scriptManager):
-    global droneController
+    global drone_controller
     #summary = ScriptThread.current_script_thread().dbConnection.createTaskSummary()
-    #droneController.sendResult(type='task_summary', **summary)
+    #drone_controller.sendResult(type='task_summary', **summary)
 
 read_args_and_props()
 init_dirs()
@@ -102,7 +102,7 @@
         accept commands from the controller module, perform
         the action, then go back to listening '''
 
-    droneController = DroneController(
+    drone_controller = DroneController(
         props.get_property('constrictor.address'), 
         int(props.get_property('constrictor.port')))
 
@@ -110,7 +110,7 @@
 
     while True:
         try:
-            command = droneController.recv()['command']
+            command = drone_controller.recv()['command']
     
             if command['action'] == 'setprop':
                 prop = str(command['prop'])
@@ -135,12 +135,12 @@
                         exec(f)
                     except Exception, e:
                         log_error("script execution failed: %s" % str(e))
-                        droneController.sendError(text=str(e))
+                        drone_controller.sendError(text=str(e))
                     f.close()
                 continue
 
         except KeyboardInterrupt:
-            droneController.shutdown()
+            drone_controller.shutdown()
 
 else:
     init_db()



More information about the open-ils-commits mailing list