Skip to content

Commit

Permalink
fix wrongly called exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
martenson committed Aug 28, 2017
1 parent a394faf commit c060bbb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/galaxy/managers/library_datasets.py
Expand Up @@ -9,6 +9,7 @@
from galaxy.exceptions import ItemAccessibilityException
from galaxy.exceptions import InsufficientPermissionsException
from galaxy.exceptions import ObjectNotFound
from galaxy.exceptions import RequestParameterInvalidException
from galaxy.managers import tags
from galaxy.util import validation

Expand Down Expand Up @@ -102,7 +103,7 @@ def _validate_and_parse_update_payload(self, payload):
continue
if key in ('name'):
if len(val) < MINIMUM_STRING_LENGTH:
raise exceptions.RequestParameterInvalidException('%s must have at least length of %s'% (key, MINIMUM_STRING_LENGTH))
raise RequestParameterInvalidException('%s must have at least length of %s'% (key, MINIMUM_STRING_LENGTH))
val = validation.validate_and_sanitize_basestring(key, val)
validated_payload[key] = val
if key in ('misc_info'):
Expand All @@ -111,11 +112,11 @@ def _validate_and_parse_update_payload(self, payload):
if key in ('file_ext'):
datatype = self.app.datatypes_registry.get_datatype_by_extension(val)
if datatype is None:
raise exceptions.RequestParameterInvalidException('This Galaxy does not recognize the datatype of: %s'% (val))
raise RequestParameterInvalidException('This Galaxy does not recognize the datatype of: %s'% (val))
validated_payload[key] = val
if key in ('genome_build'):
if len(val) < MINIMUM_STRING_LENGTH:
raise exceptions.RequestParameterInvalidException('%s must have at least length of %s'% (key, MINIMUM_STRING_LENGTH))
raise RequestParameterInvalidException('%s must have at least length of %s'% (key, MINIMUM_STRING_LENGTH))
val = validation.validate_and_sanitize_basestring(key, val)
validated_payload[key] = val
elif key == 'tags':
Expand Down

0 comments on commit c060bbb

Please sign in to comment.