Postgresql: fetchone when nothing to fetch, throws exception
This commit is contained in:
parent
c8f3c25d84
commit
d4e8e21e50
@ -57,7 +57,10 @@ class Postgresql(object):
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
def fetchone(self):
|
def fetchone(self):
|
||||||
return self.cursor.fetchone()
|
try:
|
||||||
|
return self.cursor.fetchone()
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
|
||||||
def fetchall(self):
|
def fetchall(self):
|
||||||
return self.cursor.fetchall()
|
return self.cursor.fetchall()
|
||||||
|
Loading…
Reference in New Issue
Block a user