try:
import json
-except ImportError, e:
+except ImportError as e:
import simplejson as json
import re
"""
hits = []
- for label, search_func in plugin._SEARCH_FUNCTIONS.items():
+ for label, search_func in list(plugin._SEARCH_FUNCTIONS.items()):
result = search_func(text)
if result is not None:
hits.extend(result)
# Attempt to find a KeywordMap based on keyword
try:
keymap = models.KeywordMap.objects.get(keyword=keyword)
- except ObjectDoesNotExist, e:
+ except ObjectDoesNotExist as e:
return report_error('Keyword (%s) is not defined' % (keyword))
# Remove keyword and only scan the content