summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-06-28 19:43:58 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-06-28 19:43:58 +0000
commitb531ee93590968131ec48e35f91698a2cbd5e136 (patch)
treef8bb4e085a7bcf0c7b8119b74480f2c608358735 /src
parent38ec6a9db64a3bf6e0128a4c1031be4a0a733b59 (diff)
downloadbcfg2-b531ee93590968131ec48e35f91698a2cbd5e136.tar.gz
bcfg2-b531ee93590968131ec48e35f91698a2cbd5e136.tar.bz2
bcfg2-b531ee93590968131ec48e35f91698a2cbd5e136.zip
Fix some failure reporting
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1901 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Toolset.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index 52e7c451a..5ca0450cd 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -191,8 +191,10 @@ class Toolset(object):
failures = [key for key in ent.attrib if key[:8] == 'current_']
for fail in failures:
for field in [fail, fail[8:]]:
- print ent.get('name'), field
newent.set(field, ent.get(field))
+ #if ent.tag not in ['Package', 'Service', 'SymLink', 'ConfigFile']:
+ # print lxml.etree.tostring(ent)
+ # print lxml.etree.tostring(newent)
if self.modified:
mod = lxml.etree.SubElement(stats, "Modified")
for ent in self.modified:
@@ -246,6 +248,7 @@ class Toolset(object):
entry.set('current_to', sloc)
return False
except OSError:
+ entry.set('current_exists', 'false')
return False
def InstallSymLink(self, entry):
@@ -450,6 +453,7 @@ class Toolset(object):
sinfo = os.stat(entry.get('name'))
except OSError:
self.logger.debug("Entry %s doesn't exist" % entry.get('name'))
+ entry.set('current_exists', 'false')
return False
# pad out perms if needed
while len(entry.get('perms', '')) < 4:
@@ -457,8 +461,8 @@ class Toolset(object):
perms = oct(sinfo[ST_MODE])[-4:]
if perms == entry.get('perms'):
return True
- entry.get('current_perms', perms)
self.logger.debug("Entry %s permissions incorrect" % entry.get('name'))
+ entry.set('current_perms', perms)
return False
def InstallPermissions(self, entry):