From 7e610eb8d5d2fd8dfc28778ce1516a7b1bff6dc3 Mon Sep 17 00:00:00 2001 From: Shaun McCance Date: Sat, 16 Jan 2021 12:20:41 -0500 Subject: yelp-new.py: Converted yelp-new to python --- tools/yelp-check.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/yelp-check.py') 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 + '/'): -- cgit v1.2.1