Agregar manejo de errrores
parent
b8012e9909
commit
be8979b8bf
|
@ -20,6 +20,10 @@ def home():
|
|||
@app.route('/repositories')
|
||||
def get_repositories():
|
||||
|
||||
|
||||
if not os.path.isdir(repositories_base_path):
|
||||
return jsonify({"error": "Repository storage not found, git functionality may not be installed."}), 500
|
||||
|
||||
repos = []
|
||||
for entry in os.scandir(repositories_base_path):
|
||||
if entry.is_dir(follow_symlinks=False) and os.path.isfile(os.path.join(entry.path, "HEAD")):
|
||||
|
|
Loading…
Reference in New Issue