home
·
contact
·
privacy
projects
/
plomlombot-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3247d4e
)
Fix bugs in twt integration.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 5 Feb 2016 10:16:14 +0000
(11:16 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 5 Feb 2016 10:16:14 +0000
(11:16 +0100)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index c6a3777407c6dbceaffaf36c3d034bc400667a6a..786b072bf483d1c69cfd19e18c18895214bbbf6b 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-247,13
+247,13
@@
def handle_command(command, argument, notice, target, session):
def try_open(mode):
try:
twtfile = open(session.twtfile, "w")
- except
PermissionError, FileNotFoundErro
r:
- notice("CAN'T ACCESS OR CREATE TWT FILE
."
)
+ except
(PermissionError, FileNotFoundError) as er
r:
+ notice("CAN'T ACCESS OR CREATE TWT FILE
: " + str(err)
)
return None
return twtfile
from datetime import datetime
- if not os.access(
path
, os.F_OK):
+ if not os.access(
session.twtfile
, os.F_OK):
twtfile = try_open("w")
if None == twtfile:
return