[library-web] ignore failures in removing old trees



commit f18ae6fe3d811fdc62a63d5511fddb15258880c1
Author: Frédéric Péters <fpeters 0d be>
Date:   Sun Jan 26 11:49:01 2014 +0000

    ignore failures in removing old trees

 src/lgo.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/lgo.py b/src/lgo.py
index 315015f..e984abc 100755
--- a/src/lgo.py
+++ b/src/lgo.py
@@ -469,7 +469,10 @@ class Lgo(App):
             if not extract_filename.startswith(tarname_without_minor):
                 continue
             extract_dir = os.path.join(app.config.private_dir, 'extracts', extract_filename)
-            shutil.rmtree(extract_dir)
+            try:
+                shutil.rmtree(extract_dir)
+            except OSError:
+                continue
             if os.path.exists(extract_dir + '.extract-stamp'):
                 os.unlink(extract_dir + '.extract-stamp')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]