summaryrefslogtreecommitdiffstats
path: root/Under-Testing/Server-Code-New/truthtableClass.py
diff options
context:
space:
mode:
authorTriatmoko2011-11-18 03:16:42 +0100
committerTriatmoko2011-11-18 03:16:42 +0100
commit6b7615a9eae752f0d375d078565d77a8f7068ac8 (patch)
treea1223a724519485c62b612955be4e2a5b8c03f3f /Under-Testing/Server-Code-New/truthtableClass.py
parentfound error on the smart test (diff)
downloadgsm-selftest-6b7615a9eae752f0d375d078565d77a8f7068ac8.tar.gz
gsm-selftest-6b7615a9eae752f0d375d078565d77a8f7068ac8.tar.xz
gsm-selftest-6b7615a9eae752f0d375d078565d77a8f7068ac8.zip
nagios function fully working
Diffstat (limited to 'Under-Testing/Server-Code-New/truthtableClass.py')
-rw-r--r--Under-Testing/Server-Code-New/truthtableClass.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Under-Testing/Server-Code-New/truthtableClass.py b/Under-Testing/Server-Code-New/truthtableClass.py
index 3195dee..c45ab4d 100644
--- a/Under-Testing/Server-Code-New/truthtableClass.py
+++ b/Under-Testing/Server-Code-New/truthtableClass.py
@@ -48,7 +48,8 @@ class trueTable:
deviceLists = self.db.deviceList()
self.db.closeDBConn()
- for device in deviceLists:
+ for items in deviceLists:
+ device = items[0]
for result in self.resultsList:
if device == result[0] or device == result[1]:
if int(result[2]) == 200:
@@ -63,7 +64,6 @@ class trueTable:
self.deviceStatus.append([device,'OK'])
else:
self.deviceStatus.append([device,'OK'])
- break
elif int(result[2]) == 486:
found = False
@@ -83,9 +83,9 @@ class trueTable:
self.deviceStatus.append([device,'UNKNOWN'])
for status in self.deviceStatus:
- if status[2] == 'OK':
+ if status[1] == 'OK':
self.OK = self.OK+1
- elif status[2] == 'NOT OK':
+ elif status[1] == 'NOT OK':
self.FAILED = self.FAILED+1
else:
self.handlerError = self.handlerError+1