summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakahashi Mamoru <pitman0016@gmail.com>2014-10-20 14:00:45 +0900
committerTakahashi Mamoru <pitman0016@gmail.com>2014-10-20 14:00:45 +0900
commit5e6b11da08171f71bbdb59f2dec0b275ae1ed76b (patch)
treeab250cba6dd54a5a3f0e1b5d0f34c4bcc0afbbed
parent97dae9844f2c235f6eb2c0fafdc468d817ac1af5 (diff)
Fix the error occurred when a column value includes unicode strings.
Its error message is "query error: user-defined function raised exception".
-rwxr-xr-xbin/q2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/q b/bin/q
index f94b7db..54d9216 100755
--- a/bin/q
+++ b/bin/q
@@ -166,7 +166,7 @@ parser.add_option_group(query_option_group)
def regexp(regular_expression, data):
if data is not None:
- if type(data) is not str:
+ if not isinstance(data, str) and not isinstance(data, unicode):
data = str(data)
return re.search(regular_expression, data) is not None
else: