summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/stagingarea.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index d0eec599..f730fd51 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -103,6 +103,9 @@ class StagingArea(object):
def monkey_patcher(real):
def make_something(tarinfo, targetpath): # pragma: no cover
+ if os.path.exists(targetpath):
+ try: os.remove(targetpath)
+ except: pass
try:
return real(tarinfo, targetpath)
except OSError, e: