Skip to content

Instantly share code, notes, and snippets.

@cupofcodeblog
Last active December 24, 2024 20:14
No employee name was given
def main():
  try:
    # check if the user entered the employee name
    sys.argv[1]
    # rest of the main function...
 
except IndexError:
    print_in_color(
      """
      Missing employee name (as it appears in the payslip):
      py ./main.py '<EMPLOYEE_NAME>' (with the quotes!)
      Don't be shy, tell me your name :D
      """, color.YELLOW
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment