summaryrefslogtreecommitdiffstats
path: root/base/common/python/pki/encoder.py
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2015-08-11 20:55:48 +0200
committerChristian Heimes <cheimes@redhat.com>2015-08-14 13:03:18 +0200
commit12badcabc1cd345256a4902f7b0583cf667ecd8d (patch)
treed0a45d096fab9c0b14d5221557a616824ecfd24a /base/common/python/pki/encoder.py
parentd63ade55f5cc2a9ecf21ea2b43cfac80149c4c29 (diff)
downloadpki-12badcabc1cd345256a4902f7b0583cf667ecd8d.tar.gz
pki-12badcabc1cd345256a4902f7b0583cf667ecd8d.tar.xz
pki-12badcabc1cd345256a4902f7b0583cf667ecd8d.zip
Make pki PEP 8 compatible
Large portions of the patch was automatically created with autopep8: find base/ -name '*.py' | xargs autopep8 --in-place --ignore E309 \ --aggressive find base/common/upgrade base/server/upgrade -type f -and \ -not -name .gitignore | autopep8 --in-place --ignore E309 --aggressive autopep8 --in-place --ignore E309 --aggressive \ base/common/sbin/pki-upgrade \ base/server/sbin/pkispawn \ base/server/sbin/pkidestroy \ base/server/sbin/pki-server \ base/server/sbin/pki-server-upgrade About two dozent violations were fixed manually. https://fedorahosted.org/pki/ticket/708
Diffstat (limited to 'base/common/python/pki/encoder.py')
-rw-r--r--base/common/python/pki/encoder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/common/python/pki/encoder.py b/base/common/python/pki/encoder.py
index 84bf32506..6d5725f0f 100644
--- a/base/common/python/pki/encoder.py
+++ b/base/common/python/pki/encoder.py
@@ -32,6 +32,7 @@ class CustomTypeEncoder(json.JSONEncoder):
when-instance-variable-name-is-same-as-method-name
"""
# pylint: disable=E0202
+
def default(self, obj):
for k, v in TYPES.iteritems():
if isinstance(obj, v):
@@ -56,7 +57,7 @@ class CustomTypeEncoder(json.JSONEncoder):
return new_dict
-def CustomTypeDecoder(dct):
+def CustomTypeDecoder(dct): # nopep8
if len(dct) == 1:
type_name, value = dct.items()[0]
if type_name in TYPES: