[Pkg-debile-commits] [debile-master] 26/28: Added some exception catching for master reset

Léo Cavaillé leo.cavaille-guest at alioth.debian.org
Wed Aug 21 13:36:53 UTC 2013


This is an automated email from the git hooks/post-receive script.

leo.cavaille-guest pushed a commit to branch master
in repository debile-master.

commit a5e3675a9be1900af909ddcfe5335de7a9a6f7bd
Author: Léo Cavaillé <leo at cavaille.net>
Date:   Wed Aug 21 10:43:34 2013 +0200

    Added some exception catching for master reset
---
 lucy/cli/init.py |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/lucy/cli/init.py b/lucy/cli/init.py
index a9b442f..8cede95 100644
--- a/lucy/cli/init.py
+++ b/lucy/cli/init.py
@@ -25,12 +25,21 @@ def main():
     if args.flags.contains('--drop'):
         print "Dropping the database schema"
         metadata.drop_all(bind=engine)
-        print "Erasing the pool"
-        shutil.rmtree(pool)
-        print "Erasing the incoming"
-        shutil.rmtree(incoming)
-        print "Erasing the job attachments"
-        shutil.rmtree(jobs)
+        try:
+            print "Erasing the pool"
+            shutil.rmtree(pool)
+        except:
+            print "Could not delete"
+        try:
+            print "Erasing the incoming"
+            shutil.rmtree(incoming)
+        except:
+            print "Could not delete"
+        try:
+            print "Erasing the job attachments"
+            shutil.rmtree(jobs)
+        except:
+            print "Could not delete"
 
     metadata.create_all(bind=engine)
     initialadmin = lucymodel.User(login='admin',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git



More information about the Pkg-debile-commits mailing list