Skip to content

Commit

Permalink
write log to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoqifa committed Nov 26, 2015
1 parent d4eccca commit 8c00bba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions python/hangover.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,4 @@
body="Gonna work from home. " + random.choice(excuses)
)

try:
if not os.path.exists('logs'):
os.mkdir('logs')
with open('logs/file.txt', 'a') as lh:
lh.write("Message sent at " + strftime("%a, %d %b %Y %H:%M:%S") + "\n")
except Exception as e:
print e
print "Message sent at " + strftime("%a, %d %b %Y %H:%M:%S")
8 changes: 1 addition & 7 deletions python/smack_my_bitch_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,4 @@
body="Late at work. " + random.choice(reasons)
)

try:
if not os.path.exists('logs'):
os.mkdir('logs')
with open('logs/file.txt', 'a') as lh:
lh.write("Message sent at " + strftime("%a, %d %b %Y %H:%M:%S") + "\n")
except Exception as e:
print e
print "Message sent at " + strftime("%a, %d %b %Y %H:%M:%S")

0 comments on commit 8c00bba

Please sign in to comment.