Skip to content

Commit

Permalink
Merge pull request #6510 from nsoranzo/release_18.05_backport_29f8e29…
Browse files Browse the repository at this point in the history
…b0bf5d50c0b735aa707d2a61623cc805b

[18.05] Fix infinite loop in uploads
  • Loading branch information
martenson committed Jul 17, 2018
2 parents fd33c5c + 7b8e4f9 commit ef702e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/galaxy/datatypes/proteomics.py
Expand Up @@ -393,8 +393,10 @@ def sniff_prefix(self, file_prefix):
header_lines = []
while True:
line = contents.readline()
if line is None or len(line) == 0:
pass
if not line:
return False
if line.strip() == "":
continue
elif line.startswith('H\t'):
header_lines.append(line)
else:
Expand Down
3 changes: 3 additions & 0 deletions lib/galaxy/datatypes/sniff.py
Expand Up @@ -290,6 +290,9 @@ def guess_ext(fname, sniff_order, is_binary=False):
>>> from galaxy.datatypes.registry import example_datatype_registry_for_sample
>>> datatypes_registry = example_datatype_registry_for_sample()
>>> sniff_order = datatypes_registry.sniff_order
>>> fname = get_test_fname('empty.txt')
>>> guess_ext(fname, sniff_order)
'txt'
>>> fname = get_test_fname('megablast_xml_parser_test1.blastxml')
>>> guess_ext(fname, sniff_order)
'blastxml'
Expand Down
Empty file.

0 comments on commit ef702e1

Please sign in to comment.