Fixed never raised exception in composite parsing

This commit is contained in:
Daniele Varrazzo 2012-02-23 14:29:39 +00:00
parent 4e1d96082a
commit 1332d4a0d8

View File

@ -861,7 +861,7 @@ class CompositeCaster(object):
rv = [] rv = []
for m in self._re_tokenize.finditer(s): for m in self._re_tokenize.finditer(s):
if m is None: if m is None:
raise psycopg2.InterfaceError("can't parse type: %r", s) raise psycopg2.InterfaceError("can't parse type: %r" % s)
if m.group(1): if m.group(1):
rv.append(None) rv.append(None)
elif m.group(2): elif m.group(2):