Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 530730d

Browse files
committed
createToken.py: Fix typo output_filename => input_filename
output_filename is not defined in else branch. Most likely author wanted to use input_filename instead
1 parent 9f67867 commit 530730d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kuksa_certificates/jwt/createToken.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ def createJWTToken(input_filename, priv_key):
1919

2020
encoded = jwt.encode(payload, priv_key, algorithm="RS256")
2121

22-
if input_filename.endswith(".json"):
23-
output_filename = input_filename[:-5] + ".token"
24-
else:
25-
output_filename = output_filename + ".token"
22+
output_filename = input_filename[:-5] if input_filename.endswith(".json") else input_filename
23+
output_filename += ".token"
2624

2725
print("Writing signed access token to {}".format(output_filename))
2826
with open(output_filename, "w") as output:

0 commit comments

Comments
 (0)