summaryrefslogtreecommitdiffstats
path: root/For Weekly Test
diff options
context:
space:
mode:
authortt412011-08-27 09:07:33 +0200
committertt412011-08-27 09:07:33 +0200
commit6e56fb3dd82dd404a8ff456bd5502c04e65b3222 (patch)
treede7511177b169d2283a6cbf33d84ab65193444eb /For Weekly Test
parentfound bugs on DB class, for checking task on temp task table.previous class a... (diff)
downloadgsm-selftest-6e56fb3dd82dd404a8ff456bd5502c04e65b3222.tar.gz
gsm-selftest-6e56fb3dd82dd404a8ff456bd5502c04e65b3222.tar.xz
gsm-selftest-6e56fb3dd82dd404a8ff456bd5502c04e65b3222.zip
edit bugs for checking task list on temp task table. so if the table remain empty will send 0. before still return 1.
Diffstat (limited to 'For Weekly Test')
-rw-r--r--For Weekly Test/19-08-2011/DbClass.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/For Weekly Test/19-08-2011/DbClass.py b/For Weekly Test/19-08-2011/DbClass.py
index 1264656..cccf736 100644
--- a/For Weekly Test/19-08-2011/DbClass.py
+++ b/For Weekly Test/19-08-2011/DbClass.py
@@ -64,15 +64,17 @@ class DBMySQLConnection:
#parse the output from the mysql by creating a list
#with lists where each attribue(column) gets independent
#element of the list
-
for record in output:
columns = list()
for entry in record:
columns.append(str(entry))
#columns.append(str(0))
self.tasksList.append(columns)
-
- return 1
+
+ if not self.tasksList:
+ return 0
+ else:
+ return 1
except MySQLdb.Error, e:
error = str(e)
if error[1:5] == '1146':