diff options
author | Holger Weiß <holger@zedat.fu-berlin.de> | 2011-09-21 22:30:40 +0200 |
---|---|---|
committer | Holger Weiß <holger@zedat.fu-berlin.de> | 2011-09-21 22:30:40 +0200 |
commit | 8eef2c9e6ef9e7dd7be0e0d85b2c6616d0622e3c (patch) | |
tree | 327d8c13a8f5d5464632e2a9580a9af66ead9fb9 /src/lib | |
parent | d5afbbfd17608121ad8d79136f4abb2cbb5e3091 (diff) | |
download | bcfg2-8eef2c9e6ef9e7dd7be0e0d85b2c6616d0622e3c.tar.gz bcfg2-8eef2c9e6ef9e7dd7be0e0d85b2c6616d0622e3c.tar.bz2 bcfg2-8eef2c9e6ef9e7dd7be0e0d85b2c6616d0622e3c.zip |
bcfg2-lint: Honor the "empty" attribute
When checking <Path type="file"> entries, don't complain about missing
text if the "empty" attribute is set to true.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Lint/RequiredAttrs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Server/Lint/RequiredAttrs.py b/src/lib/Server/Lint/RequiredAttrs.py index c021c2764..f11ad9217 100644 --- a/src/lib/Server/Lint/RequiredAttrs.py +++ b/src/lib/Server/Lint/RequiredAttrs.py @@ -120,7 +120,8 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): if '__text__' in required_attrs: required_attrs.remove('__text__') - if not entry.text: + if (not entry.text and + not entry.get('empty', 'false').lower() == 'true'): self.LintError("required-attrs-missing", "Text missing for %s %s in %s: %s" % (entry.tag, name, filename, |