Skip to content

Commit

Permalink
strip spacing from api secrets to make input parsing more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
infinityofspace committed Aug 25, 2024
1 parent 5bf7157 commit a1e8b43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkb_client/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def main():
if len(api_key.strip()) == 0:
while True:
api_key = input("Please enter your API key you got from Porkbun (usually starts with \"pk\"): ")
if len(api_key) == 0:
if len(api_key.strip()) == 0:
print("The api key can not be empty.")
else:
break
Expand All @@ -183,7 +183,7 @@ def main():
while True:
api_secret = input(
"Please enter your API key secret you got from Porkbun (usually starts with \"sk\"): ")
if len(api_secret) == 0:
if len(api_secret.strip()) == 0:
print("The api key secret can not be empty.")
else:
break
Expand Down

0 comments on commit a1e8b43

Please sign in to comment.