mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-28 21:27:54 +00:00
write log to stdout
This commit is contained in:
parent
d4eccca9fb
commit
8c00bbac16
@ -41,10 +41,4 @@ client.messages.create(
|
||||
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")
|
||||
|
@ -42,10 +42,4 @@ client.messages.create(
|
||||
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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user