Diederik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/63668


Change subject: Two fixes to rolematcher.py
......................................................................

Two fixes to rolematcher.py

Change-Id: I13b481707feafac3bd09188ae80a07ff6bc8b8a8
---
M files/misc/PacketLossLogtailer.py
M files/misc/rolematcher.py
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/63668/1

diff --git a/files/misc/PacketLossLogtailer.py 
b/files/misc/PacketLossLogtailer.py
index 4c2c2f9..42e3d99 100644
--- a/files/misc/PacketLossLogtailer.py
+++ b/files/misc/PacketLossLogtailer.py
@@ -27,12 +27,12 @@
     def __init__(self):
         '''This function should initialize any data structures or variables
         needed for the internal state of the line parser.'''
+        self.last_update_time = time.time()
         self.reset_state()
         self.lock = threading.RLock()
         # a list of rolematchers which are simple object to determine the role 
of a particular server
         # this list is obtained from crawling noc.wikimedia.org/pybal and 
parse the available configurations
         self.day_in_seconds = 24 * 60 * 60
-        self.last_update_time = time.time()
         self.matchers = rolematcher.init()
         # this is what will match the packet loss lines
         # packet loss format :
diff --git a/files/misc/rolematcher.py b/files/misc/rolematcher.py
index 1a4dd6d..71d0940 100644
--- a/files/misc/rolematcher.py
+++ b/files/misc/rolematcher.py
@@ -204,7 +204,7 @@
 
 
 if __name__ == '__main__':
-    if len(sys.argv) != 1:
+    if sys.argv[0] == '':
         print 'Please specify path to packetloss log file, call this file only 
for testing purposes.'
         sys.exit(-1)
     else:

-- 
To view, visit https://gerrit.wikimedia.org/r/63668
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13b481707feafac3bd09188ae80a07ff6bc8b8a8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Diederik <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to