diff options
author | Matthew Harmsen <mharmsen@redhat.com> | 2017-06-02 02:10:02 +0200 |
---|---|---|
committer | Matthew Harmsen <mharmsen@redhat.com> | 2017-06-02 02:10:02 +0200 |
commit | f7b6305396581f5916498cc4ea8247596bf39aaf (patch) | |
tree | f0d33e714665a2394c693e828cca7dc933b93837 /base/common | |
parent | 772e05e746570c13afeb60516c07a3fb95ca3e78 (diff) | |
download | pki-f7b6305396581f5916498cc4ea8247596bf39aaf.tar.gz pki-f7b6305396581f5916498cc4ea8247596bf39aaf.tar.xz pki-f7b6305396581f5916498cc4ea8247596bf39aaf.zip |
Fixed pylint issues
- https://pagure.io/dogtagpki/issue/2713 - Build failure due to Pylint issues
Diffstat (limited to 'base/common')
-rw-r--r-- | base/common/python/pki/cli/pkcs12.py | 4 | ||||
-rw-r--r-- | base/common/python/pki/encoder.py | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/base/common/python/pki/cli/pkcs12.py b/base/common/python/pki/cli/pkcs12.py index 8934d33a7..6b99fcfbd 100644 --- a/base/common/python/pki/cli/pkcs12.py +++ b/base/common/python/pki/cli/pkcs12.py @@ -62,10 +62,10 @@ class PKCS12ImportCLI(pki.cli.CLI): print(' --help Show help message.') print() - def execute(self, args): + def execute(self, argv): try: - opts, _ = getopt.gnu_getopt(args, 'v', [ + opts, _ = getopt.gnu_getopt(argv, 'v', [ 'pkcs12-file=', 'pkcs12-password=', 'pkcs12-password-file=', 'no-trust-flags', 'no-user-certs', 'no-ca-certs', 'overwrite', 'verbose', 'debug', 'help']) diff --git a/base/common/python/pki/encoder.py b/base/common/python/pki/encoder.py index 8485ab883..d3298bc67 100644 --- a/base/common/python/pki/encoder.py +++ b/base/common/python/pki/encoder.py @@ -82,14 +82,14 @@ class CustomTypeEncoder(json.JSONEncoder): """ # pylint: disable=E0202 - def default(self, obj): + def default(self, o): for k, v in iteritems(TYPES): - if isinstance(obj, v): - return {k: obj.__dict__} + if isinstance(o, v): + return {k: o.__dict__} for t in itervalues(NOTYPES): - if isinstance(obj, t): - return self.attr_name_conversion(obj.__dict__, type(obj)) - return json.JSONEncoder.default(self, obj) + if isinstance(o, t): + return self.attr_name_conversion(o.__dict__, type(o)) + return json.JSONEncoder.default(self, o) @staticmethod def attr_name_conversion(attr_dict, object_class): |