python style tweaks
authorerickson <erickson@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 8 Apr 2010 18:04:11 +0000 (18:04 +0000)
committererickson <erickson@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 8 Apr 2010 18:04:11 +0000 (18:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/constrictor/trunk@858 6d9bc8c9-1ec2-4278-b937-99fde70a366f

constrictor.py

index 39c54f3..6ad1260 100755 (executable)
@@ -24,7 +24,7 @@ import constrictor.data
 
 props = None
 props_filename = PROPS_FILENAME
-droneController = None
+drone_controller = None
 
 def usage():
     print '''
@@ -85,9 +85,9 @@ def read_args_and_props():
 
 
 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 @@ if props.get_property('constrictor.listen') == 'true':
         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 @@ if props.get_property('constrictor.listen') == 'true':
 
     while True:
         try:
-            command = droneController.recv()['command']
+            command = drone_controller.recv()['command']
     
             if command['action'] == 'setprop':
                 prop = str(command['prop'])
@@ -135,12 +135,12 @@ if props.get_property('constrictor.listen') == 'true':
                         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()