summaryrefslogtreecommitdiffstats
path: root/tools/upgrade
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-16 16:19:51 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-16 16:19:51 -0400
commitcc6df36fbefe3ab6c3a218c0a95fd66ee47f68aa (patch)
tree8b1d94ffabe71b13231f28296ef0e77327b32d71 /tools/upgrade
parent2875c06a476f9e2b49ca1cccbbcbd494f735a3e3 (diff)
downloadbcfg2-cc6df36fbefe3ab6c3a218c0a95fd66ee47f68aa.tar.gz
bcfg2-cc6df36fbefe3ab6c3a218c0a95fd66ee47f68aa.tar.bz2
bcfg2-cc6df36fbefe3ab6c3a218c0a95fd66ee47f68aa.zip
tools: write all changed files when migrating perms to mode
Diffstat (limited to 'tools/upgrade')
-rwxr-xr-xtools/upgrade/1.3/migrate_perms_to_mode.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/upgrade/1.3/migrate_perms_to_mode.py b/tools/upgrade/1.3/migrate_perms_to_mode.py
index e061558d3..18abffec2 100755
--- a/tools/upgrade/1.3/migrate_perms_to_mode.py
+++ b/tools/upgrade/1.3/migrate_perms_to_mode.py
@@ -13,6 +13,7 @@ def setmodeattr(elem):
elem.set('mode', elem.get('perms'))
del elem.attrib['perms']
return True
+ return False
def writefile(f, xdata):
@@ -32,7 +33,7 @@ def convertinfo(ifile):
return
found = False
for i in xdata.findall('//Info'):
- found = setmodeattr(i)
+ found |= setmodeattr(i)
if found:
writefile(ifile, xdata)
@@ -47,7 +48,7 @@ def convertstructure(structfile):
return
found = False
for path in xdata.xpath('//BoundPath|//Path'):
- found = setmodeattr(path)
+ found |= setmodeattr(path)
if found:
writefile(structfile, xdata)