diff --git a/beat/editor/resources.py b/beat/editor/resources.py index 2c3053f77809e65eda45794e9c40c0b5685c24fa..ae5def8af805f24d74de2f034601231b8a8b7286 100644 --- a/beat/editor/resources.py +++ b/beat/editor/resources.py @@ -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):