Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
68c4f16a
Commit
68c4f16a
authored
May 04, 2018
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/editor/resources.py
View file @
68c4f16a
...
...
@@ -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
NotADirectory
Error
(
'Invalid resource path %s'
%
resource_path
)
raise
IO
Error
(
'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
NotADirectory
Error
:
except
IO
Error
:
return
[]
def
get
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment