Skip to content

Commit

Permalink
Fix sniffing composite files to reuse existing abstractions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jun 29, 2020
1 parent 6290ac3 commit 9c1ff33
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/data_source/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import sys
from json import dump, load, loads

from six.moves.urllib.request import urlopen

from galaxy.datatypes import sniff
from galaxy.datatypes.registry import Registry
from galaxy.datatypes.upload_util import handle_upload, UploadProblemException
Expand Down Expand Up @@ -184,7 +182,7 @@ def to_path(path_or_url):
is_url = path_or_url.find('://') != -1 # todo fixme
if is_url:
try:
temp_name = sniff.stream_to_file(urlopen(path_or_url), prefix='url_paste')
temp_name = sniff.stream_url_to_file(path_or_url)
except Exception as e:
raise UploadProblemException('Unable to fetch %s\n%s' % (path_or_url, unicodify(e)))

Expand Down

0 comments on commit 9c1ff33

Please sign in to comment.