-
Notifications
You must be signed in to change notification settings - Fork 27
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
Misc fixes #236
Misc fixes #236
Conversation
The new feature is breaking tests. Signed-off-by: Christian Heimes <cheimes@redhat.com>
Tests are failing under 3.4 because IPA packages no longer support 3.4. Signed-off-by: Christian Heimes <cheimes@redhat.com>
Issue was found by pylint. Signed-off-by: Christian Heimes <cheimes@redhat.com>
Signed-off-by: Christian Heimes <cheimes@redhat.com>
In Python 3, the exception method has the function signature def exception(self, msg, *args, exc_info=True, **kwargs): but Python 2 does not allow that syntax. Signed-off-by: Christian Heimes <cheimes@redhat.com>
Codecov Report
@@ Coverage Diff @@
## master #236 +/- ##
=========================================
Coverage ? 72.79%
=========================================
Files ? 41
Lines ? 4440
Branches ? 449
=========================================
Hits ? 3232
Misses ? 1052
Partials ? 156
Continue to review full report at Codecov.
|
In Python 3, ConnectionError is also a builtin exception. Import and use the exceptions package from requests to avoid name collision. Signed-off-by: Christian Heimes <cheimes@redhat.com>
Signed-off-by: Christian Heimes <cheimes@redhat.com>
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.
/lgtm
@@ -55,6 +55,7 @@ def __init__(self, plugin, debug): | |||
extra = {'origin': plugin.origin} | |||
super(CustodiaLoggingAdapter, self).__init__(logger, extra=extra) | |||
|
|||
# pylint: disable=arguments-differ | |||
def exception(self, msg, *args, **kwargs): |
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.
So what happen when python2 code calls this ?
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.
All is fine, it's just cosmetics.
The signature is different in Python 2 than Python 3. pylint is complaining about the difference. We cannot use the Python 3 signature because that is invalid syntax in Python 3. In Python 2, keywords after *args
is not supported: exception(self, msg, *args, exc_info=True, **kwargs)
Fix misc errors detected or caused by most recent versions of pytest, pep8 and pylint.