From 95a08ed1bbac8a01d43000e3549a0095e83c7a5a Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 3 Feb 2012 19:11:57 -0500 Subject: [PATCH] fix type error --- sfa/storage/filter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfa/storage/filter.py b/sfa/storage/filter.py index 3fb96297..1a710f65 100644 --- a/sfa/storage/filter.py +++ b/sfa/storage/filter.py @@ -87,13 +87,14 @@ class Filter(Parameter, dict): # quoting, except for array types. if isinstance(value, (list, tuple, set)): return "ARRAY[%s]" % ", ".join(map(self.quote, value)) + else: return Filter._quote(value) # pgdb._quote isn't supported in python 2.7/f16, so let's implement it here @staticmethod def _quote(x): - if isinstance(x, datetime): + if isinstance(x, datetime.datetime): x = str(x) elif isinstance(x, unicode): x = x.encode( 'utf-8' ) -- 2.47.0