username read from environ, PEP8
This commit is contained in:
parent
617122acaa
commit
4d36e85f82
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue