diff --git a/python/hangover.py b/python/hangover.py index b1903cd..b28bfc6 100755 --- a/python/hangover.py +++ b/python/hangover.py @@ -8,22 +8,23 @@ import subprocess # exit if sessions with my username are found output = subprocess.check_output('who') -if 'my_username' in output: + +if os.environ.get('USER') in output: sys.exit() # returns 'None' if the key doesn't exist TWILIO_ACCOUNT_SID = os.environ.get('TWILIO_ACCOUNT_SID') -TWILIO_AUTH_TOKEN = os.environ.get('TWILIO_AUTH_TOKEN') +TWILIO_AUTH_TOKEN = os.environ.get('TWILIO_AUTH_TOKEN') # Phone numbers -my_number = '+xxx' +my_number = '+xxx' number_of_boss = '+xxx' excuses = [ - 'Locked out', - 'Pipes broke', - 'Food poisoning', - 'Not feeling well' + 'Locked out', + 'Pipes broke', + 'Food poisoning', + 'Not feeling well' ] client = TwilioRestClient(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN)