summaryrefslogtreecommitdiffstats
path: root/notFinishedCode
diff options
context:
space:
mode:
authorRefik Hadzialic2011-07-25 23:12:49 +0200
committerRefik Hadzialic2011-07-25 23:12:49 +0200
commitfd80c625b3c68c037cc0eed37c173a0050b27c52 (patch)
treedfc87b4ca1aaab4784817b735ec258f385447870 /notFinishedCode
parentMade some changes to the DB class, and a modification to make the deleting of... (diff)
downloadgsm-selftest-fd80c625b3c68c037cc0eed37c173a0050b27c52.tar.gz
gsm-selftest-fd80c625b3c68c037cc0eed37c173a0050b27c52.tar.xz
gsm-selftest-fd80c625b3c68c037cc0eed37c173a0050b27c52.zip
Changed the the deleting in an reverse order, so no bugs appear.
Diffstat (limited to 'notFinishedCode')
-rw-r--r--notFinishedCode/.dbClass.py.swpbin16384 -> 0 bytes
-rw-r--r--notFinishedCode/dbTest.py17
2 files changed, 11 insertions, 6 deletions
diff --git a/notFinishedCode/.dbClass.py.swp b/notFinishedCode/.dbClass.py.swp
deleted file mode 100644
index 3da5f30..0000000
--- a/notFinishedCode/.dbClass.py.swp
+++ /dev/null
Binary files differ
diff --git a/notFinishedCode/dbTest.py b/notFinishedCode/dbTest.py
index a3f2038..5d62f3e 100644
--- a/notFinishedCode/dbTest.py
+++ b/notFinishedCode/dbTest.py
@@ -7,13 +7,18 @@ dbname = 'gsmselftesting'
x = dbClass.DBMySQLConnection(user, passw, host, dbname)
print "connected to the DB ", x.connectDB()
print "do i have anything to do", x.anyTasksToDo()
-temp = x.tasksList[:]
-for index in range(len(temp)):
- item = temp[index]
- taskID = item[0]
- if item[0] == '17' or item[0] =='18' or item[0]=='19':
+
+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]
+ print item[0]
print "delete a task from temp table", x.deleteTempTask(taskID)
- x.tasksList.remove(item)
+ del x.tasksList[index-1]
print '\n\n\n\n'
#new task to do
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$