Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions python/hangover.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,4 @@
body="Gonna work from home. " + random.choice(excuses)
)

try:
f = open('logs/file.txt', 'a')
except IOError as e:
# dir & file don't exist; create them
os.mkdir('logs')
f = open('logs/file.txt', 'a')
except Exception as e:
print e
else:
pass

# log it
f.write("Message sent at " + strftime("%a, %d %b %Y %H:%M:%S") + "\n")
f.close()
print "Message sent at " + strftime("%a, %d %b %Y %H:%M:%S")
15 changes: 1 addition & 14 deletions python/smack_my_bitch_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,4 @@
body="Late at work. " + random.choice(reasons)
)

try:
f = open('logs/file.txt', 'a')
except IOError as e:
# dir & file don't exist; create them
os.mkdir('logs')
f = open('logs/file.txt', 'a')
except Exception as e:
print e
else:
pass

# log it
f.write("Message sent at " + strftime("%a, %d %b %Y %H:%M:%S") + "\n")
f.close()
print "Message sent at " + strftime("%a, %d %b %Y %H:%M:%S")