From bac9718d1168053ba49ce1b3d7796070edbfbaa5 Mon Sep 17 00:00:00 2001 From: Jeff Li Date: Sun, 27 Dec 2020 09:59:53 -0800 Subject: [PATCH] add timestamp to output --- checkin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/checkin.py b/checkin.py index eacc4c4..d8e4358 100755 --- a/checkin.py +++ b/checkin.py @@ -94,7 +94,10 @@ if __name__ == '__main__': verbose = arguments['--verbose'] try: - print("Attempting to check in {} {}. Confirmation: {}\n".format(first_name, last_name, reservation_number)) + now = datetime.now() + time_of_attempt = now.strftime("%H:%M:%S") + + print("Attempting to check in {} {} at {}. Confirmation: {}\n".format(first_name, last_name, time_of_attempt, reservation_number)) auto_checkin(reservation_number, first_name, last_name, verbose) except KeyboardInterrupt: print("Ctrl+C detected, canceling checkin")