diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2014-06-14 08:26:06 -0400 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2014-06-14 08:26:06 -0400 |
commit | 705a6d17667492d9d79430ca1b69cc50c750579c (patch) | |
tree | fc055cc06bad7ea927479d679784d8de3eaf9e1a /bin | |
parent | 6225144e7670e7e502ff2eb0d2dd0170db780127 (diff) |
Added fix for regexp handling of null and non string data
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/q | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -165,7 +165,12 @@ parser.add_option_group(query_option_group) #----------------------------------------------- def regexp(regular_expression, data): - return re.search(regular_expression, data) is not None + if data is not None: + if type(data) is not str: + data = str(data) + return re.search(regular_expression, data) is not None + else: + return False class Sqlite3DBResults(object): def __init__(self,query_column_names,results): |