-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fail_on_error and filter_invalid options to load command #73
Conversation
* tests_fixes: Fix: Use older version of pbr to fix "AttributeError: Distribution instance has no attribute 'pbr'". See: https://bugs.launchpad.net/pbr/+bug/1493735
…annot be found, exit immedately
@@ -438,15 +466,20 @@ def load(req, *opts): | |||
elif os.path.exists(url): | |||
if os.path.isdir(url): | |||
log.debug("directory %s verify %s as %s via %s" % (url, params['verify'], params['as'], params['via'])) | |||
req.md.load_dir(url, url=params['as'], validate=opts['validate'], post=post) | |||
req.md.load_dir(url, url=params['as'], validate=opts['validate'], post=post, fail_on_error=opts['fail_on_error'], filter_invalid=opts['filter_invalid']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm starting to wonder if we should refactor the argument passing to use named arguments instead. Opinions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean in the call to load_dir()
? Or more generally?
I agree that req.md.load_dir(directory=url, url=params['as'], validate=opts['validate'], post=post, fail_on_error=opts['fail_on_error'], filter_invalid=opts['filter_invalid'])
is more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant more generally - these arrays are passed to the worker threads...
|
did you find a better solution? |
Thinking you already merged this I removed the branch from my fork, that apparently made github close this PR. I reopend it, if you could merge it, that would be great. |
Add fail_on_error and filter_invalid options to load command
As discussed in #62
Added some tests as well. Let me know what you think.