Commit 68c4f16a authored by André Anjos's avatar André Anjos 💬
Browse files

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

parent a5d2b08f
Pipeline #19803 failed with stages
in 149 minutes and 33 seconds
......@@ -140,7 +140,7 @@ def generate_file_tree(entity, config):
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"""
return generate_entity_tree(entity, self.config)
except NotADirectoryError:
except IOError:
return []
def get(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment