summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/psycopg1.py7
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 84410e4..bb969f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-18 Federico Di Gregorio <fog@initd.org>
+
+ * lib/psycopg1.py: fixed .dictfetchrow() to return None if fetchone()
+ returns None instead of raising an exception.
+
+ * ZPsycopgDA/icons: replaced corrupted icons with good ones.
+
2005-06-13 Federico Di Gregorio <fog@initd.org>
* psycopg/psycopgmodule.c (psyco_connect): changed the port keyword
diff --git a/lib/psycopg1.py b/lib/psycopg1.py
index 09b6e84..614418f 100644
--- a/lib/psycopg1.py
+++ b/lib/psycopg1.py
@@ -65,8 +65,11 @@ class cursor(_2cursor):
def dictfetchone(self):
row = _2cursor.fetchone(self)
- return self.__build_dict(row)
-
+ if row:
+ return self.__build_dict(row)
+ else:
+ return row
+
def dictfetchmany(self, size):
res = []
rows = _2cursor.fetchmany(self, size)