X-Git-Url: http://woldlab.caltech.edu/gitweb/?a=blobdiff_plain;f=htsworkflow%2Ffrontend%2Fbcmagic%2Fviews.py;h=43b32b5668277eb47b160fac71f5df814a5939b2;hb=refs%2Fheads%2Fpython3-django1.5;hp=f9fb7933cdecbe70230cc57f04d50c2ec7569e4f;hpb=4262586d10cc0cc227390873b301b55244204c11;p=htsworkflow.git diff --git a/htsworkflow/frontend/bcmagic/views.py b/htsworkflow/frontend/bcmagic/views.py index f9fb793..43b32b5 100644 --- a/htsworkflow/frontend/bcmagic/views.py +++ b/htsworkflow/frontend/bcmagic/views.py @@ -11,7 +11,7 @@ from htsworkflow.frontend.bcmagic import plugin try: import json -except ImportError, e: +except ImportError as e: import simplejson as json import re @@ -34,7 +34,7 @@ def __plugin_search(text): """ 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) @@ -72,7 +72,7 @@ def __magic_process(text): # 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