summaryrefslogtreecommitdiffstats
path: root/notFinishedCode
diff options
context:
space:
mode:
authorMac-Linux2011-07-26 14:59:18 +0200
committerMac-Linux2011-07-26 14:59:18 +0200
commitacc5b8ebefab50f9b63dd885409ab11d6d810b50 (patch)
treec553b57ed5a9a968564430228b1713c4344676a5 /notFinishedCode
parentclean the folder test weekly for 30 June (diff)
parentI made some changes, I added an attribute field if the task was done before s... (diff)
downloadgsm-selftest-acc5b8ebefab50f9b63dd885409ab11d6d810b50.tar.gz
gsm-selftest-acc5b8ebefab50f9b63dd885409ab11d6d810b50.tar.xz
gsm-selftest-acc5b8ebefab50f9b63dd885409ab11d6d810b50.zip
Merge branch 'master' of lab.ks.uni-freiburg.de:lsfks/projekte/gsm-selftest
Conflicts: For Weekly Test/30-07-2011/ClientClass.pyc For Weekly Test/30-07-2011/ControllerClass.pyc For Weekly Test/30-07-2011/DbClass.pyc For Weekly Test/30-07-2011/LogFileClass.pyc For Weekly Test/30-07-2011/PingClass.pyc For Weekly Test/30-07-2011/classCheck.pyc notFinishedCode/dbClass.pyc
Diffstat (limited to 'notFinishedCode')
-rw-r--r--notFinishedCode/dbClass.py2
-rw-r--r--notFinishedCode/dbTest.py23
2 files changed, 18 insertions, 7 deletions
diff --git a/notFinishedCode/dbClass.py b/notFinishedCode/dbClass.py
index dc7ca41..90e4758 100644
--- a/notFinishedCode/dbClass.py
+++ b/notFinishedCode/dbClass.py
@@ -67,6 +67,7 @@ class DBMySQLConnection:
columns = list()
for entry in record:
columns.append(str(entry))
+ columns.append(str(0))
self.tasksList.append(columns)
return 1
except MySQLdb.Error, e:
@@ -239,6 +240,7 @@ class DBMySQLConnection:
columns.append(str(taskNo))
columns.append(str(fromDevice))
columns.append(str(toDevice))
+ columns.append(str(0))
self.tasksList.append(columns)
return 1
diff --git a/notFinishedCode/dbTest.py b/notFinishedCode/dbTest.py
index 5d62f3e..c980764 100644
--- a/notFinishedCode/dbTest.py
+++ b/notFinishedCode/dbTest.py
@@ -12,13 +12,21 @@ 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 index in range(len(x.tasksList), -1, -1):
- if index != 0:
- item = x.tasksList[index-1]
- taskID = item[0]
+for index in range(len(x.tasksList)):
+ 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]
- print "delete a task from temp table", x.deleteTempTask(taskID)
- del x.tasksList[index-1]
+ tempItem[4]=str(1)
+ print "delete a task from temp table", x.deleteTempTask(taskID)
+ x.tasksList[index]=tempItem
+ #del x.tasksList[index-1]
print '\n\n\n\n'
#new task to do
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
@@ -37,7 +45,8 @@ for item in x.tasksList[:]:
taskNo = item[1]
callFrom = item[2]
callTo = item[3]
- print "call from to ", taskID , callFrom , callTo, taskNo
+ testDone = item[4]
+ print "call from to ", taskID , callFrom , callTo, taskNo, testDone
print "close connection to the DB", x.closeDBConn()
del x