Skip to content

Commit

Permalink
Fix for sniffing tool xml files when they have less than 10 lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
blankenberg committed Nov 17, 2014
1 parent 3152f53 commit a2c13e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion galaxy/tools/loader_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ def load_tool_elements_from_path(path):
def __looks_like_a_tool(path):
with open(path) as f:
for i in range(10):
line = f.next()
try:
line = f.next()
except StopIteration:
break
if "<tool" in line:
return True
return False
Expand Down

0 comments on commit a2c13e4

Please sign in to comment.