make exception dotted name python3 compliant
[htsworkflow.git] / htsworkflow / pipelines / retrieve_config.py
index 7c64050c0f3d2b5d04e80f9d6391b11e9266a51d..de9b051c9f6c9026e19957ec3093c37d5784b4f3 100644 (file)
@@ -10,10 +10,7 @@ import types
 import six
 from six.moves import urllib
 
-try:
-    import json
-except ImportError as e:
-    import simplejson as json
+import json
 
 from htsworkflow.auth import apidata
 from htsworkflow.util import api
@@ -49,7 +46,7 @@ def retrieve_flowcell_info(base_host_url, flowcell):
     try:
         apipayload = urllib.parse.urlencode(apidata)
         web = urllib.request.urlopen(url, apipayload)
-    except urllib.request.HTTPError as e:
+    except urllib.error.HTTPError as e:
         errmsg = 'URLError: %d %s' % (e.code, e.msg)
         LOGGER.error(errmsg)
         LOGGER.error('opened %s' % (url,))