summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2017-03-15 14:05:39 +0100
committerJulien Danjou <julien@danjou.info>2017-03-15 14:07:12 +0100
commitf612f0e5087662feb02f763f129a5b18beeba06b (patch)
tree887f5146921f80d635c2cc8b0f80865a2fa69130
parent08be40a2200d7d6a5e6ecd03db7f7c923727b8b1 (diff)
Fix ignore_path_errors call in main
The `parse_ignore_path_errors' function expects a list of paths, not an individual path. Change-Id: Icc8a4721b38776d8268c731ea5b624a3e4a3b2a9
Notes
Notes (review): Code-Review+2: Joshua Harlow <jxharlow@godaddy.com> Workflow+1: Joshua Harlow <jxharlow@godaddy.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 21 Mar 2017 19:48:12 +0000 Reviewed-on: https://review.openstack.org/445945 Project: openstack/doc8 Branch: refs/heads/master
-rw-r--r--doc8/main.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc8/main.py b/doc8/main.py
index 4f2d4f5..60fb6ea 100644
--- a/doc8/main.py
+++ b/doc8/main.py
@@ -342,13 +342,12 @@ def main():
342 args['ignore_path'].extend(cfg.pop('ignore_path', [])) 342 args['ignore_path'].extend(cfg.pop('ignore_path', []))
343 343
344 cfg.setdefault('ignore_path_errors', {}) 344 cfg.setdefault('ignore_path_errors', {})
345 for tmp_ignore_path_error in args.pop('ignore_path_errors', []): 345 tmp_ignores = parse_ignore_path_errors(args.pop('ignore_path_errors', []))
346 tmp_ignores = parse_ignore_path_errors(tmp_ignore_path_error) 346 for path, ignores in six.iteritems(tmp_ignores):
347 for path, ignores in six.iteritems(tmp_ignores): 347 if path in cfg['ignore_path_errors']:
348 if path in cfg['ignore_path_errors']: 348 cfg['ignore_path_errors'][path].update(ignores)
349 cfg['ignore_path_errors'][path].update(ignores) 349 else:
350 else: 350 cfg['ignore_path_errors'][path] = set(ignores)
351 cfg['ignore_path_errors'][path] = set(ignores)
352 351
353 args.update(cfg) 352 args.update(cfg)
354 setup_logging(args.get('verbose')) 353 setup_logging(args.get('verbose'))