summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-06-14 19:52:46 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-06-14 19:52:46 +0000
commit4afa9bbe3d00ec997dd255d1d93e5ce5e13d5b2a (patch)
treea76b3b63f7745ebf1bb8a01f402fc59e859011a9 /src/lib/Client
parent084828ef29ab87db18831ff8cbfd88ed744c082f (diff)
downloadbcfg2-4afa9bbe3d00ec997dd255d1d93e5ce5e13d5b2a.tar.gz
bcfg2-4afa9bbe3d00ec997dd255d1d93e5ce5e13d5b2a.tar.bz2
bcfg2-4afa9bbe3d00ec997dd255d1d93e5ce5e13d5b2a.zip
Improve error message for attempted directory unlinks (Patch from Torsten Rehn) (Resolves Ticket #657)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5277 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Tools/POSIX.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py
index e57ee96b6..0ad9dacf6 100644
--- a/src/lib/Client/Tools/POSIX.py
+++ b/src/lib/Client/Tools/POSIX.py
@@ -279,6 +279,9 @@ class POSIX(Bcfg2.Client.Tools.Tool):
if entry.get('prune', 'false') == 'true' and entry.get("qtest"):
for pname in entry.get("qtest").split(":"):
ulfailed = False
+ if os.path.isdir(pname):
+ self.logger.info("Not removing extra directory %s, please check and remove manually" % pname)
+ continue
try:
self.logger.debug("Unlinking file %s" % pname)
os.unlink(pname)