summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-05-26 15:04:34 -0400
committerSimo Sorce <simo@redhat.com>2015-05-26 15:05:01 -0400
commit41d2241a038f2b0ddf797cf9a60ec52d1e96d3c7 (patch)
treece8a1571cf0dd8b04109587b68f9472f05aa93ce
parentbcffccf4e50d09c4ddb1e47dd41f594f891a95c6 (diff)
downloadcustodia-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>
-rw-r--r--Makefile1
-rw-r--r--custodia/message/kem.py10
-rw-r--r--custodia/secrets.py1
-rw-r--r--custodia/store/enclite.py2
4 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b6b23ef..f6c0314 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ lint:
# Ignore cherrypy class members as they are dynamically added
pylint -d c,r,i,W0613 -r n -f colorized \
--notes= \
+ --disable=star-args \
./custodia
pep8:
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']