AssistantEric/APIsManager.py

changeset 123
a4793081090c
parent 122
d746710bfe2e
child 127
1c7a8660933f
diff -r d746710bfe2e -r a4793081090c AssistantEric/APIsManager.py
--- a/AssistantEric/APIsManager.py	Fri Jan 01 12:18:51 2016 +0100
+++ b/AssistantEric/APIsManager.py	Thu Jun 23 19:11:53 2016 +0200
@@ -293,11 +293,14 @@
             # step 1: create entry in file table and get the ID
             query.prepare(self.populate_file_stmt)
             query.bindValue(":file", apiFile)
-            query.exec_()
+            if not query.exec_():
+                return
             query.prepare(self.file_id_stmt)
             query.bindValue(":file", apiFile)
-            query.exec_()
-            query.next()
+            if not query.exec_():
+                return
+            if not query.next():
+                return
             id = int(query.value(0))
             
             # step 2: delete all entries belonging to this file

eric ide

mercurial