Index: /branches/1.0/jobarchived/jobarchived.py
===================================================================
--- /branches/1.0/jobarchived/jobarchived.py	(revision 857)
+++ /branches/1.0/jobarchived/jobarchived.py	(revision 858)
@@ -48,5 +48,5 @@
 def processArgs( args ):
 
-    SHORT_L    = 'p:hvc:'
+    SHORT_L   = 'p:hvc:'
     LONG_L    = [ 'help', 'config=', 'pidfile=', 'version' ]
 
@@ -55,5 +55,5 @@
     global PIDFILE
 
-    PIDFILE    = None
+    PIDFILE   = None
 
     try:
@@ -136,15 +136,15 @@
     global JOB_SQL_DBASE, DAEMONIZE, RRDTOOL, JOB_TIMEOUT, MODRRDTOOL, JOB_SQL_PASSWORD, JOB_SQL_USER
 
-    ARCHIVE_PATH        = cfg.get( 'DEFAULT', 'ARCHIVE_PATH' )
-
-    ARCHIVE_HOURS_PER_RRD    = cfg.getint( 'DEFAULT', 'ARCHIVE_HOURS_PER_RRD' )
-
-    DEBUG_LEVEL        = cfg.getint( 'DEFAULT', 'DEBUG_LEVEL' )
-
-    USE_SYSLOG        = cfg.getboolean( 'DEFAULT', 'USE_SYSLOG' )
-
-    SYSLOG_LEVEL        = cfg.getint( 'DEFAULT', 'SYSLOG_LEVEL' )
-
-    MODRRDTOOL        = False
+    ARCHIVE_PATH           = cfg.get( 'DEFAULT', 'ARCHIVE_PATH' )
+
+    ARCHIVE_HOURS_PER_RRD  = cfg.getint( 'DEFAULT', 'ARCHIVE_HOURS_PER_RRD' )
+
+    DEBUG_LEVEL            = cfg.getint( 'DEFAULT', 'DEBUG_LEVEL' )
+
+    USE_SYSLOG             = cfg.getboolean( 'DEFAULT', 'USE_SYSLOG' )
+
+    SYSLOG_LEVEL           = cfg.getint( 'DEFAULT', 'SYSLOG_LEVEL' )
+
+    MODRRDTOOL             = False
 
     try:
@@ -171,20 +171,19 @@
         sys.exit( 1 )
 
-    GMETAD_CONF        = cfg.get( 'DEFAULT', 'GMETAD_CONF' )
-
-    ARCHIVE_XMLSOURCE    = cfg.get( 'DEFAULT', 'ARCHIVE_XMLSOURCE' )
-
-    ARCHIVE_DATASOURCES    = getlist( cfg.get( 'DEFAULT', 'ARCHIVE_DATASOURCES' ) )
-
-    ARCHIVE_EXCLUDE_METRICS    = getlist( cfg.get( 'DEFAULT', 'ARCHIVE_EXCLUDE_METRICS' ) )
-
-    JOB_SQL_DBASE        = cfg.get( 'DEFAULT', 'JOB_SQL_DBASE' )
-    JOB_SQL_USER        = cfg.get( 'DEFAULT', 'JOB_SQL_USER' )
+    GMETAD_CONF             = cfg.get( 'DEFAULT', 'GMETAD_CONF' )
+
+    ARCHIVE_XMLSOURCE       = cfg.get( 'DEFAULT', 'ARCHIVE_XMLSOURCE' )
+
+    ARCHIVE_DATASOURCES     = getlist( cfg.get( 'DEFAULT', 'ARCHIVE_DATASOURCES' ) )
+
+    ARCHIVE_EXCLUDE_METRICS = getlist( cfg.get( 'DEFAULT', 'ARCHIVE_EXCLUDE_METRICS' ) )
+
+    JOB_SQL_DBASE           = cfg.get( 'DEFAULT', 'JOB_SQL_DBASE' )
+    JOB_SQL_USER            = cfg.get( 'DEFAULT', 'JOB_SQL_USER' )
     JOB_SQL_PASSWORD        = cfg.get( 'DEFAULT', 'JOB_SQL_PASSWORD' )
 
-    JOB_TIMEOUT        = cfg.getint( 'DEFAULT', 'JOB_TIMEOUT' )
-
-    DAEMONIZE        = cfg.getboolean( 'DEFAULT', 'DAEMONIZE' )
-
+    JOB_TIMEOUT             = cfg.getint( 'DEFAULT', 'JOB_TIMEOUT' )
+
+    DAEMONIZE               = cfg.getboolean( 'DEFAULT', 'DAEMONIZE' )
 
     return True
@@ -1183,5 +1182,5 @@
 
             self.gridName    = str( attrs.get( 'NAME', "" ) )
-            self.time    = str( attrs.get( 'LOCALTIME', "" ) )
+            self.time        = str( attrs.get( 'LOCALTIME', "" ) )
 
             debug_msg( 10, '`-Grid found: %s' %( self.gridName ) )
@@ -1276,6 +1275,6 @@
     """Setup a connection and file object to Ganglia's XML"""
 
-    s        = None
-    fd        = None
+    s           = None
+    fd          = None
     data        = None
     slot        = None
@@ -1305,9 +1304,9 @@
         """Setup connection to XML source"""
 
-        self.update_now    = True
+        self.update_now = True
 
         self.slot.acquire()
 
-        self.data    = None
+        self.data       = None
 
         for res in socket.getaddrinfo( self.host, self.port, socket.AF_UNSPEC, socket.SOCK_STREAM ):
@@ -1655,6 +1654,6 @@
     """Class for handling RRD activity"""
 
-    myMetrics = { }
-    lastStored = { }
+    myMetrics   = { }
+    lastStored  = { }
     timeserials = { }
     slot = None
@@ -1665,7 +1664,7 @@
         global MODRRDTOOL
 
-        self.block    = 0
-        self.cluster    = cluster
-        self.config    = config
+        self.block   = 0
+        self.cluster = cluster
+        self.config  = config
         self.slot    = threading.Lock()
 
@@ -1699,5 +1698,5 @@
 
             host_dir    = cluster_dir + '/' + host
-            dirlist        = os.listdir( host_dir )
+            dirlist     = os.listdir( host_dir )
 
             for dir in dirlist:
@@ -1755,6 +1754,6 @@
                 self.myMetrics[ host ][ metric['name'] ] = [ ]
         else:
-            self.myMetrics[ host ]                = { }
-            self.myMetrics[ host ][ metric['name'] ]    = [ ]
+            self.myMetrics[ host ]                   = { }
+            self.myMetrics[ host ][ metric['name'] ] = [ ]
 
         # Push new metric onto stack
@@ -1931,6 +1930,6 @@
         """Make a RRD location/path and filename"""
 
-        rrd_dir        = '%s/%s/%s/%s'    %( check_dir(ARCHIVE_PATH), self.cluster, host, timeserial )
-        rrd_file    = '%s/%s.rrd'    %( rrd_dir, metricname )
+        rrd_dir  = '%s/%s/%s/%s'    %( check_dir(ARCHIVE_PATH), self.cluster, host, timeserial )
+        rrd_file = '%s/%s.rrd'    %( rrd_dir, metricname )
 
         return rrd_dir, rrd_file
@@ -1986,7 +1985,7 @@
             if metric['name'] == metricname:
 
-                period        = self.determinePeriod( host, metric['time'] )    
-
-                archive_secs    = ARCHIVE_HOURS_PER_RRD * (60 * 60)
+                period       = self.determinePeriod( host, metric['time'] )    
+
+                archive_secs = ARCHIVE_HOURS_PER_RRD * (60 * 60)
 
                 if (int( metric['time'] ) - int( period ) ) > archive_secs:
@@ -2039,5 +2038,5 @@
             heartbeat    = 8 * int( interval )
 
-            params        = [ ]
+            params       = [ ]
 
             params.append( '--step' )
@@ -2062,7 +2061,7 @@
         debug_msg( 9, 'rrdupdate: using timeserial %s for %s/%s' %( timeserial, host, metricname ) )
 
-        rrd_dir, rrd_file    = self.makeRrdPath( host, metricname, timeserial )
-
-        update_list        = self.makeUpdateList( host, metriclist )
+        rrd_dir, rrd_file = self.makeRrdPath( host, metricname, timeserial )
+
+        update_list       = self.makeUpdateList( host, metriclist )
 
         if len( update_list ) > 0:
