Jan-05-2023, 05:30 PM
(This post was last modified: Jan-05-2023, 05:30 PM by deanhystad.)
finally will run every time the try/except block is evaluated. You only want to return a value if JIRA._get_user_id() is successful.
def searchUser(userstring): while True: try: return JIRA._get_user_id(userstring) except: userstring = input("Please enter a valid user: ") teamlead = "Teamleader_DisplayName" teamlead = searchUser(teamlead) departmentlead = "Departmentlead_DisplayName" departmentlead = searchUser(departmentlead)Methods that start with an underscore indicate that the method is not meant for public use. The package authors are warning you thatJIRA._get_user_id() can change at any time and it is unwise for you to use this method in your code.