client/tools/rhncfg/config_common/transactions.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 08c885bfd66cc3cb85412317c31ffcd393d5fd3b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Jul 9 11:27:12 2012 +0200
check symlink not target file existence
fixing broken link backups
diff --git a/client/tools/rhncfg/config_common/transactions.py
b/client/tools/rhncfg/config_common/transactions.py
index 5164394..c2ec5f1 100644
--- a/client/tools/rhncfg/config_common/transactions.py
+++ b/client/tools/rhncfg/config_common/transactions.py
@@ -92,7 +92,7 @@ class DeployTransaction:
if os.path.islink(path):
log_debug(9, "copying symlink %s to %s"%
(path,new_path_dir))
linkto = os.readlink(path)
- if os.path.exists(new_path):
+ if os.path.lexists(new_path):
log_debug(9, "symlink %s exists, removing
it"% (path))
os.unlink(new_path)
os.symlink(linkto,new_path)