Postgresql: fetchone when nothing to fetch, throws exception

This commit is contained in:
Doug Blank committed 2016-05-01 17:03:52 -04:00
1 parent c8f3c25d84
commit d4e8e21e50
1 file changed
+4 -1
@@ -57,7 +57,10 @@ class Postgresql(object):
raise
def fetchone(self):
return self.cursor.fetchone()
try:
return self.cursor.fetchone()
except:
return None
def fetchall(self):
return self.cursor.fetchall()