Skip to content

Commit

Permalink
Minor lint fixes around whitespace, as flagged by pylama. (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthope authored Jan 12, 2024
1 parent 1c466e1 commit b5ba21c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions secretupdater/secretupdater/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import datetime
import hashlib
import base64
import subprocess as sp
import subprocess as sp
import json
# silence some warnings:
import requests
Expand Down Expand Up @@ -304,9 +304,9 @@ def _get_k8s_auth(credentials):
except TypeError:
raise ClusterAttributeError("Cluster credential or metadata misconfigured or not found")

try:
try:
json_token = json.loads(eks_output)
token_data = dict(filter(lambda x: "status" in x , json_token.items()))
token_data = dict(filter(lambda x: "status" in x, json_token.items()))
token = token_data['status']['token']
app.logger.debug(token)
except ValueError:
Expand Down Expand Up @@ -336,9 +336,9 @@ def _get_k8s_auth(credentials):
{
"name": "admin",
"user": {
"token": token
},
},
"token": token
},
},
],
}
elif _get_credential(kube, 'token'):
Expand Down Expand Up @@ -427,8 +427,10 @@ class KuberentesConnectionError(KuberentesError):
class BadSecretFormat(Exception):
pass


class BadEKSToken(Exception):
pass


class ClusterAttributeError(Exception):
pass
pass

0 comments on commit b5ba21c

Please sign in to comment.