Skip to content

Commit 55cf3b7

Browse files
committed
missing HTTPerror
1 parent 16ecaf3 commit 55cf3b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

singularity/hub/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
import tempfile
1414
import sys
1515

16+
try:
17+
from urllib.error import HTTPError
18+
except ImportError:
19+
from urllib2 import HTTPError
20+
1621

1722
def api_get(url,headers=None,token=None,data=None, return_json=True, stream_to=None):
1823
'''api_get will use requests to get a particular url

0 commit comments

Comments
 (0)