Skip to content

Commit

Permalink
Fixing some error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Spelchak committed Feb 1, 2018
1 parent cdfe226 commit d315dfc
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/galaxy/jobs/dynamic_tool_destination.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def __validate_destination(cls, valid_rule, return_bool, rule, tool, counter):

for priority in rule["destination"]["priority"]:
if priority not in priority_list:
error = "Invalid priority classification: "
error = "Invalid priority: "
error += str(priority)
if not return_bool:
error += " Ignoring..."
Expand All @@ -413,8 +413,9 @@ def __validate_destination(cls, valid_rule, return_bool, rule, tool, counter):
valid_rule = False

elif not isinstance(rule["destination"]["priority"][priority], str):
error = "No '" + str(priority)
error += "'priority classification for rule " + str(counter)
error = "Cannot parse tool destination '"
error += str(rule["destination"]["priority"][priority])
error += "' for rule " + str(counter)
error += " in '" + str(tool) + "'."
if not return_bool:
error += " Ignoring..."
Expand Down Expand Up @@ -782,8 +783,8 @@ def infinite_defaultdict():
'default_destination']['priority'][priority]

else:
error = ("Invalid default priority classification '" +
str(priority_classification) + "' found in config!")
error = ("Invalid default priority destination '" +
str(priority) + "' found in config!")
if verbose:
log.debug(error)
valid_config = False
Expand Down Expand Up @@ -823,7 +824,7 @@ def infinite_defaultdict():
if curr['priority'] in priority_list:
new_config['users'][user]['priority'] = curr['priority']
"""
if curr['priority'] in ['low', 'med', 'high']: ### DO THINGS HERE (maybe)
if curr['priority'] in ['low', 'med', 'high']: ###TODO: ask about user priorities
new_config['users'][user]['priority'] = curr['priority']
else:
error = ("User '" + user + "', priority '"
Expand Down Expand Up @@ -871,7 +872,7 @@ def infinite_defaultdict():
###May not be necessary check if something has all priorities specified as default
for priority in priority_list:
if priority not in curr['default_destination']['priority']:
error = ("No default for priority classification "
error = ("No default for destination for priority "
+ str(priority) + " in tool " + str(tool))
if verbose:
log.debug(error)
Expand All @@ -887,14 +888,14 @@ def infinite_defaultdict():
tool_has_default = True
else:
error = ("No default '" + str(priority) +
"' priority classification for tool "
"' priority destination for tool "
+ str(tool) + " in config!")
if verbose:
log.debug(error)
valid_config = False

else:
error = ("Invalid default priority classification '" +
error = ("Invalid default priority '" +
str(priority) + "' for " + str(tool)
+ " found in config!")
if verbose:
Expand Down

0 comments on commit d315dfc

Please sign in to comment.