diff options
author | Shaun McCance <shaunm@redhat.com> | 2021-01-16 12:20:41 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@redhat.com> | 2021-01-16 12:20:41 -0500 |
commit | 7e610eb8d5d2fd8dfc28778ce1516a7b1bff6dc3 (patch) | |
tree | 61ab0bf7c171a90ac25efcff5ebd461879c0ffdf /tools/yelp-check.py | |
parent | 57c72e0ddbc14519dd9b596458e6788a805f169e (diff) | |
download | yelp-tools-7e610eb8d5d2fd8dfc28778ce1516a7b1bff6dc3.tar.gz |
yelp-new.py: Converted yelp-new to python
Diffstat (limited to 'tools/yelp-check.py')
-rw-r--r-- | tools/yelp-check.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/yelp-check.py b/tools/yelp-check.py index 652062e..a3eb486 100644 --- a/tools/yelp-check.py +++ b/tools/yelp-check.py @@ -152,6 +152,9 @@ class Checker: val = self.config.get('check', arg, fallback=None) if val is not None: return (val == 'true') + val = self.config.get('default', arg, fallback=None) + if val is not None: + return (val == 'true') return False def get_option_str(self, arg): @@ -165,6 +168,9 @@ class Checker: val = self.config.get('check', arg, fallback=None) if val is not None: return val + val = self.config.get('default', arg, fallback=None) + if val is not None: + return val return None def get_option_list(self, arg): @@ -181,6 +187,9 @@ class Checker: val = self.config.get('check', arg, fallback=None) if val is not None: return val.replace(',', ' ').split() + val = self.config.get('default', arg, fallback=None) + if val is not None: + return val.replace(',', ' ').split() return None def iter_files(self, sitedir=None): @@ -208,6 +217,7 @@ class Checker: for fname in os.listdir(filepath): newpath = os.path.join(filepath, fname) if os.path.isdir(newpath): + # FIXME https://github.com/projectmallard/pintail/issues/36 if fname == '__pintail__': continue for infile in self.iter_site(newpath, sitedir + fname + '/'): |