bam cli: give useful message when bam ls fails

This commit is contained in:
2014-11-06 18:31:13 +01:00
parent 9e49a94750
commit 301abd641c
2 changed files with 12 additions and 2 deletions

View File

@@ -93,6 +93,10 @@ class DirectoryAPI(Resource):
absolute_path_root = os.path.join(absolute_path_root, path)
parent_path = os.pardir
if not os.path.isdir(absolute_path_root):
return jsonify(message="Path is not a directory %r" % absolute_path_root)
items_list = []
for f in os.listdir(absolute_path_root):