Skip to content

Commit

Permalink
Fix error profile-list when no profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
unfor19 committed Apr 14, 2020
1 parent 6b5dcb0 commit aa90c90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/profile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from .config import Config
from .config import Config, error_exit


class Profile():
Expand All @@ -16,6 +16,9 @@ def __init__(self, name):
def lista():
credentials_content = Config.get_credentials_content()
msg = "\n"
if not credentials_content:
error_exit(
f"WARNING: Couldn't find any profile, create one by executing:\nghs profile-apply -p profile_name\n") # noqa: E501
for key, value in credentials_content.items():
token_length = len(value['personal_access_token'])
value['personal_access_token'] = \
Expand Down

0 comments on commit aa90c90

Please sign in to comment.