ignore missing files during uninstall
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 05 May 2011 09:18:12 +0200
changeset 41 4417a3553aab
parent 40 e0cb158bc13a
child 42 5548f424cea8
ignore missing files during uninstall
bake/Module.py
--- a/bake/Module.py	Thu May 05 09:17:47 2011 +0200
+++ b/bake/Module.py	Thu May 05 09:18:12 2011 +0200
@@ -74,7 +74,10 @@
     def uninstall(self, env):
         # delete installed files
         for installed in self._installed:
-            os.remove(installed)
+            try:
+                os.remove(installed)
+            except OSError:
+                pass
         # delete directories where files were installed if they are empty
         dirs = [os.path.dirname(installed) for installed in self._installed]
         def uniq(seq):