diff options
author | Jonah BrĂ¼chert <jbb@kaidan.im> | 2024-04-19 23:52:23 +0200 |
---|---|---|
committer | Jonah BrĂ¼chert <jbb@kaidan.im> | 2024-04-19 23:52:23 +0200 |
commit | 2724e6409534a948b5a2c212ae0a7192326c1b4c (patch) | |
tree | fe49421ea9c00298c01d5c5c52d0687c2f4bb9fd /src/lib/Bcfg2/Server/Lint/RequiredAttrs.py | |
parent | 4d140a72fdde0e34060b9fa1ef76e05502245d20 (diff) | |
download | bcfg2-2724e6409534a948b5a2c212ae0a7192326c1b4c.tar.gz bcfg2-2724e6409534a948b5a2c212ae0a7192326c1b4c.tar.bz2 bcfg2-2724e6409534a948b5a2c212ae0a7192326c1b4c.zip |
Run 2to3 on the entire project
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/RequiredAttrs.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Lint/RequiredAttrs.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py index 56b4e7477..6d872bfa5 100644 --- a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py +++ b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py @@ -230,7 +230,7 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): if 'Rules' not in self.core.plugins: return - for rules in self.core.plugins['Rules'].entries.values(): + for rules in list(self.core.plugins['Rules'].entries.values()): xdata = rules.pnode.data for path in xdata.xpath("//Path"): self.check_entry(path, @@ -243,7 +243,7 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): if 'Bundler' not in self.core.plugins: return - for bundle in self.core.plugins['Bundler'].entries.values(): + for bundle in list(self.core.plugins['Bundler'].entries.values()): if self.HandlesFile(bundle.name) and bundle.template is None: for path in bundle.xdata.xpath( "//*[substring(name(), 1, 5) = 'Bound']"): @@ -327,7 +327,7 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): "Text content of %s %s in %s is malformed\n%s" % (tag, name, filename, self.RenderXML(entry))) - if not attrs.issuperset(required_attrs.keys()): + if not attrs.issuperset(list(required_attrs.keys())): self.LintError( "required-attrs-missing", "The following required attribute(s) are missing for %s " @@ -338,7 +338,7 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): set(required_attrs.keys()).difference(attrs)]), self.RenderXML(entry))) - for attr, fmt in required_attrs.items(): + for attr, fmt in list(required_attrs.items()): if fmt and attr in attrs and not fmt(entry.attrib[attr]): self.LintError( "required-attr-format", |