From 5e6b11da08171f71bbdb59f2dec0b275ae1ed76b Mon Sep 17 00:00:00 2001 From: Takahashi Mamoru Date: Mon, 20 Oct 2014 14:00:45 +0900 Subject: Fix the error occurred when a column value includes unicode strings. Its error message is "query error: user-defined function raised exception". --- bin/q | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') 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: -- cgit v1.2.3