diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 45cb8575..0653203b 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -142,11 +142,16 @@ def get_osticket_number(): """Get ticket number and confirm with name from osTicket DB.""" ticket_number = None if not ost_db['Cursor']: - # No DB access, just set it to 0 - return 0 + # No DB access, return None to disable integration + return None while ticket_number is None: print_standard(' ') - _input = input('Enter ticket number: ') + _input = input('Enter ticket number (or leave blank to disable): ') + if re.match(r'^\s*$', _input): + if ask('Disable osTicket integration for this run?'): + return None + else: + continue if not re.match(r'^([0-9]+)$', _input): continue _name = osticket_get_ticket_name(_input)