diff options
author | Simo Sorce <simo@redhat.com> | 2015-05-26 15:04:34 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-05-26 15:05:01 -0400 |
commit | 41d2241a038f2b0ddf797cf9a60ec52d1e96d3c7 (patch) | |
tree | ce8a1571cf0dd8b04109587b68f9472f05aa93ce /custodia | |
parent | bcffccf4e50d09c4ddb1e47dd41f594f891a95c6 (diff) | |
download | custodia-41d2241a038f2b0ddf797cf9a60ec52d1e96d3c7.tar.gz custodia-41d2241a038f2b0ddf797cf9a60ec52d1e96d3c7.tar.xz custodia-41d2241a038f2b0ddf797cf9a60ec52d1e96d3c7.zip |
Remove pylint star-args exceptions
Newer pylint version completely removed the star-args warning, including
recognizing the exception in the source code.
Remove it from all source code to avoid annoyinf pylint errors about
unrecognized exceptions, and add a general exception in the pylint makefile
invocation, as apparently it is ok there. This will avoid warnings if older
versions of pylint are used.
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'custodia')
-rw-r--r-- | custodia/message/kem.py | 10 | ||||
-rw-r--r-- | custodia/secrets.py | 1 | ||||
-rw-r--r-- | custodia/store/enclite.py | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/custodia/message/kem.py b/custodia/message/kem.py index 74feacd..34b3763 100644 --- a/custodia/message/kem.py +++ b/custodia/message/kem.py @@ -120,7 +120,7 @@ class KEMHandler(MessageHandler): token = jtok.token if isinstance(token, JWS): key = self._get_key(token.jose_header) - self.client_key = JWK(**key) # pylint: disable=star-args + self.client_key = JWK(**key) token.verify(self.client_key) payload = token.payload elif isinstance(token, JWE): @@ -130,7 +130,7 @@ class KEMHandler(MessageHandler): nested = JWS() nested.deserialize(token.payload) key = self._get_key(nested.jose_header) - self.client_key = JWK(**key) # pylint: disable=star-args + self.client_key = JWK(**key) nested.verify(self.client_key) payload = nested.payload else: @@ -250,7 +250,7 @@ class KEMTests(unittest.TestCase): pass def make_tok(self, key, alg, name): - pri_key = JWK(**key) # pylint: disable=star-args + pri_key = JWK(**key) protected = {"typ": "JOSE+JSON", "kid": key['kid'], "alg": alg} @@ -261,7 +261,7 @@ class KEMTests(unittest.TestCase): return S.serialize() def test_1_Parse_GET(self): - cli_key = JWK(**self.client_key) # pylint: disable=star-args + cli_key = JWK(**self.client_key) jtok = make_sig_kem("mykey", None, cli_key, "RS256") kem = KEMHandler({'KEMKeysStore': self.kk}) kem.parse(jtok) @@ -270,6 +270,6 @@ class KEMTests(unittest.TestCase): jtok.token.decrypt(cli_key) nested = jtok.token.payload jtok = JWT(jwt=nested) - jtok.token.verify(JWK(**server_key)) # pylint: disable=star-args + jtok.token.verify(JWK(**server_key)) payload = json_decode(jtok.token.payload)['value'] self.assertEqual(payload, 'output') diff --git a/custodia/secrets.py b/custodia/secrets.py index 735d0ed..7aa43df 100644 --- a/custodia/secrets.py +++ b/custodia/secrets.py @@ -53,7 +53,6 @@ class Secrets(HTTPConsumer): def _db_key(self, trail): if len(trail) < 2: raise HTTPError(403) - # pylint: disable=star-args return os.path.join('keys', *trail) def _db_container_key(self, default, trail): diff --git a/custodia/store/enclite.py b/custodia/store/enclite.py index 3641b9d..c22f537 100644 --- a/custodia/store/enclite.py +++ b/custodia/store/enclite.py @@ -17,7 +17,7 @@ class EncryptedStore(SqliteStore): with open(config['master_key']) as f: data = f.read() key = json_decode(data) - self.mkey = jwk.JWK(**key) # pylint: disable=star-args + self.mkey = jwk.JWK(**key) if 'master_enctype' in config: self.enc = config['master_enctype'] |