Skip to content
Snippets Groups Projects
Commit 68c4f16a authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[server] NotADirectoryError does not exist on py2x, use IOError instead

parent a5d2b08f
No related branches found
No related tags found
1 merge request!3Support for new conda-based CI/CD pipelines
Pipeline #
......@@ -140,7 +140,7 @@ def generate_file_tree(entity, config):
assert_valid_entity(entity)
resource_path = os.path.join(config.path, entity)
if not os.path.isdir(resource_path):
raise NotADirectoryError('Invalid resource path %s' % resource_path)
raise IOError('Invalid resource path %s' % resource_path)
return path_to_dict(resource_path)
......@@ -304,7 +304,7 @@ def gen_endpoint(entity):
"""Regenerates the entity tree"""
try:
return generate_entity_tree(entity, self.config)
except NotADirectoryError:
except IOError:
return []
def get(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment