summaryrefslogtreecommitdiff
path: root/lib/extras.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extras.py')
-rw-r--r--lib/extras.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/extras.py b/lib/extras.py
index 5b45bdd..22ae3f6 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -852,9 +852,9 @@ class CompositeCaster(object):
for m in self._re_tokenize.finditer(s):
if m is None:
raise psycopg2.InterfaceError("can't parse type: %r" % s)
- if m.group(1):
+ if m.group(1) is not None:
rv.append(None)
- elif m.group(2):
+ elif m.group(2) is not None:
rv.append(self._re_undouble.sub(r"\1", m.group(2)))
else:
rv.append(m.group(3))