summaryrefslogtreecommitdiffstats
path: root/base/common/python
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2017-03-31 09:48:07 -0600
committerMatthew Harmsen <mharmsen@redhat.com>2017-03-31 09:49:59 -0600
commit3e80b04c1de37568d304b2d76f324c026830fd11 (patch)
tree3313a9ad86c33d95afdb2226c8ce1502246f252c /base/common/python
parent5e4321ff0a55d854964a8765f3b61d60c50e2b45 (diff)
downloadpki-3e80b04c1de37568d304b2d76f324c026830fd11.tar.gz
pki-3e80b04c1de37568d304b2d76f324c026830fd11.tar.xz
pki-3e80b04c1de37568d304b2d76f324c026830fd11.zip
Misc pylint, flake8 and tox fixes
Diffstat (limited to 'base/common/python')
-rw-r--r--base/common/python/pki/__init__.py5
-rw-r--r--base/common/python/pki/authority.py2
-rw-r--r--base/common/python/pki/client.py1
-rw-r--r--base/common/python/pki/feature.py1
4 files changed, 6 insertions, 3 deletions
diff --git a/base/common/python/pki/__init__.py b/base/common/python/pki/__init__.py
index 5d2a14365..c0151260b 100644
--- a/base/common/python/pki/__init__.py
+++ b/base/common/python/pki/__init__.py
@@ -269,9 +269,8 @@ class RequestNotFoundException(ResourceNotFoundException):
class UserNotFoundException(ResourceNotFoundException):
""" User Not Found Exception: return code = 404 """
-"""
-Mapping from Java Server exception classes to python exception classes
-"""
+
+# Mapping from Java Server exception classes to python exception classes
EXCEPTION_MAPPINGS = {
"com.netscape.certsrv.base.BadRequestException": BadRequestException,
"com.netscape.certsrv.base.ConflictingOperationException":
diff --git a/base/common/python/pki/authority.py b/base/common/python/pki/authority.py
index f6880b5c3..9fa459c26 100644
--- a/base/common/python/pki/authority.py
+++ b/base/common/python/pki/authority.py
@@ -289,6 +289,7 @@ class AuthorityClient(object):
self.connection.delete(url, headers)
+
encoder.NOTYPES['AuthorityData'] = AuthorityData
@@ -499,5 +500,6 @@ def main():
print("-----------------------------------")
issue_cert_using_authority(cert_client, sub_subca.aid)
+
if __name__ == "__main__":
main()
diff --git a/base/common/python/pki/client.py b/base/common/python/pki/client.py
index 3e819cfd1..90ca4fefb 100644
--- a/base/common/python/pki/client.py
+++ b/base/common/python/pki/client.py
@@ -224,5 +224,6 @@ def main():
conn.set_authentication_cert('/root/temp4.pem')
print(conn.get("", headers).json())
+
if __name__ == "__main__":
main()
diff --git a/base/common/python/pki/feature.py b/base/common/python/pki/feature.py
index 0e5171db1..1a2d4028b 100644
--- a/base/common/python/pki/feature.py
+++ b/base/common/python/pki/feature.py
@@ -133,6 +133,7 @@ class FeatureClient(object):
headers=self.headers)
return FeatureCollection.from_json(response.json())
+
encoder.NOTYPES['Feature'] = Feature