From 178c9bbed044688bce712ce00fe65d895cea5d29 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 06 2015 10:12:11 +0000 Subject: Split removing the git repos from removing project from the DB --- diff --git a/progit/ui/repo.py b/progit/ui/repo.py index a06c86c..2ba0c81 100644 --- a/progit/ui/repo.py +++ b/progit/ui/repo.py @@ -738,10 +738,12 @@ def delete_repo(repo, username=None): shutil.rmtree(repopath) shutil.rmtree(docpath) shutil.rmtree(ticketpath) - SESSION.commit() except (OSError, IOError), err: APP.logger.exception(err) - flask.flash('Could not delete the project from the system', 'error') + flask.flash('Could not delete all the repos from the system', 'error') + + try: + SESSION.commit() except SQLAlchemyError, err: # pragma: no cover SESSION.rollback() APP.logger.exception(err)