Skip to content

Commit

Permalink
Add docstring to get_user_input()
Browse files Browse the repository at this point in the history
  • Loading branch information
SurbhiJainUSC committed Feb 5, 2024
1 parent 3a2194e commit 38f11f8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions xpk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,11 +1327,15 @@ def get_capacity_arguments(args) -> tuple[str, int]:


def get_user_input(input_msg):
"""Function to get the user input for a prompt.
Args:
input_msg: message to be displayed by the prompt.
Returns:
True if user enter y or yes at the prompt, False otherwise.
"""
user_input = input(input_msg)
user_input_approves = user_input in ('y', 'yes')
if not user_input_approves:
return False
return True
return user_input in ('y', 'yes')


def run_gke_node_pool_create_command(args, system) -> int:
Expand Down

0 comments on commit 38f11f8

Please sign in to comment.