Skip to content

Commit 8c00bba

Browse files
author
zhaoqifa
committed
write log to stdout
1 parent d4eccca commit 8c00bba

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

python/hangover.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,4 @@
4141
body="Gonna work from home. " + random.choice(excuses)
4242
)
4343

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

python/smack_my_bitch_up.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,4 @@
4242
body="Late at work. " + random.choice(reasons)
4343
)
4444

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

0 commit comments

Comments
 (0)