summaryrefslogtreecommitdiffstats
path: root/notFinishedCode
diff options
context:
space:
mode:
authorMac-Linux2011-07-26 19:50:37 +0200
committerMac-Linux2011-07-26 19:50:37 +0200
commita5bc2bf9073d21e51ba3cf99bce48514d7b6cc17 (patch)
tree224698b4c0cd8737ec1ba75b0129d26fdf7175e1 /notFinishedCode
parentMerge branch 'master' of lab.ks.uni-freiburg.de:lsfks/projekte/gsm-selftest (diff)
downloadgsm-selftest-a5bc2bf9073d21e51ba3cf99bce48514d7b6cc17.tar.gz
gsm-selftest-a5bc2bf9073d21e51ba3cf99bce48514d7b6cc17.tar.xz
gsm-selftest-a5bc2bf9073d21e51ba3cf99bce48514d7b6cc17.zip
fix bug on tasklist and unisip
Diffstat (limited to 'notFinishedCode')
-rw-r--r--notFinishedCode/dbClass.pycbin7604 -> 7424 bytes
-rw-r--r--notFinishedCode/dbDemo.py28
2 files changed, 18 insertions, 10 deletions
diff --git a/notFinishedCode/dbClass.pyc b/notFinishedCode/dbClass.pyc
index a6f6966..ed7c69d 100644
--- a/notFinishedCode/dbClass.pyc
+++ b/notFinishedCode/dbClass.pyc
Binary files differ
diff --git a/notFinishedCode/dbDemo.py b/notFinishedCode/dbDemo.py
index 570336c..50dc6b6 100644
--- a/notFinishedCode/dbDemo.py
+++ b/notFinishedCode/dbDemo.py
@@ -8,11 +8,19 @@ x = dbClass.DBMySQLConnection(user, passw, host, dbname)
print "connected to the DB ", x.connectDB()
print "do i have anything to do", x.anyTasksToDo()
for item in x.tasksList:
- taskID = item[0]
- taskNo = item[1]
- callFrom = item[2]
- callTo = item[3]
- print "call from to ", taskID , callFrom , callTo, taskNo
+ item = x.tasksList[index]
+ tempItem = item
+ taskID = item[0]
+ taskNo = item[1]
+ callFrom = item[2]
+ callTo = item[3]
+ testDone = item[4]
+ print "call from to ", taskID , callFrom , callTo, taskNo, testDone
+ if testDone == str(0):
+ print item[0]
+ tempItem[4]=str(1)
+ print "delete a task from temp table", x.deleteTempTask(taskID)
+ x.tasksList[index]=tempItem
print "found", x.searchTaskList('S1IP2','GSM1')
#if variable == 0:
@@ -23,7 +31,7 @@ print "remove a task ",x.removeTaskFromList('2')
#print x.cleanTasksList()
for item in x.tasksList:
- device = item[2]
+ device = item[3]
print "device name", device
deviceAN= x.deviceAddress(str(device))
print "device's IP and number", deviceAN[0], deviceAN[1]
@@ -46,10 +54,10 @@ print "add a result to the table", x.addResult(4,34)
# callTo = item[2]
# print "call from to ", taskID , callFrom , callTo
-print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
-print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
-print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
-print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
+#print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
+#print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
+#print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
+#print 'i am inserting into the table something', x.insertTaskIn2('gsm4','sip8',2)
#-----------------------------------------------------------------------------------
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
for item in x.tasksList: