summaryrefslogtreecommitdiffstats
path: root/tools/upgrade
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-15 11:01:03 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-15 11:01:03 -0400
commitd9fc57a3276a64129f0743dd73afad6ba63fdcc0 (patch)
treef5f3f995fbd249196b8db617694d4c4f5801b4fb /tools/upgrade
parentdd72c3652a8abfa7a9f5a4a61f9c6ae2734319ea (diff)
downloadbcfg2-d9fc57a3276a64129f0743dd73afad6ba63fdcc0.tar.gz
bcfg2-d9fc57a3276a64129f0743dd73afad6ba63fdcc0.tar.bz2
bcfg2-d9fc57a3276a64129f0743dd73afad6ba63fdcc0.zip
migrate_perms_to_mode.py: fixed migration of nested BoundPath entries in bundles
Diffstat (limited to 'tools/upgrade')
-rwxr-xr-x[-rw-r--r--]tools/upgrade/1.3/migrate_perms_to_mode.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/upgrade/1.3/migrate_perms_to_mode.py b/tools/upgrade/1.3/migrate_perms_to_mode.py
index 0aa9c574c..a15de6e29 100644..100755
--- a/tools/upgrade/1.3/migrate_perms_to_mode.py
+++ b/tools/upgrade/1.3/migrate_perms_to_mode.py
@@ -36,9 +36,7 @@ def convertstructure(structfile):
"""Do perms -> mode conversion for structure files."""
xdata = lxml.etree.parse(structfile)
found = False
- for path in xdata.findall('//BoundPath'):
- found = setmodeattr(path)
- for path in xdata.findall('//Path'):
+ for path in xdata.xpath('//BoundPath|Path'):
found = setmodeattr(path)
if found:
writefile(structfile, xdata)