aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Beckmann <anbe@debian.org>2018-09-20 01:23:02 +0200
committerGuido Günther <agx@sigxcpu.org>2018-09-21 13:34:21 +0200
commita596206ab0288cb024b5e20bd5c70cb6d150a8de (patch)
treeef23edb99a5b4fecb04a1c2ab3112303041b0cf2
parent702a5420916dac0e88aeb31b756402363c1f2ef8 (diff)
PkgPolicy.symlink_orig: also remove dangling symlinks
-rw-r--r--gbp/pkg/pkgpolicy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/pkg/pkgpolicy.py b/gbp/pkg/pkgpolicy.py
index e6b3683b..53887fee 100644
--- a/gbp/pkg/pkgpolicy.py
+++ b/gbp/pkg/pkgpolicy.py
@@ -155,7 +155,7 @@ class PkgPolicy(object):
err.append(f)
continue
try:
- if os.path.exists(dst) and force:
+ if os.path.lexists(dst) and force:
os.unlink(dst)
os.symlink(src, dst)
except OSError: