home · contact · privacy
Fix bug overwriting all but last twts.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 5 Feb 2016 10:20:28 +0000 (11:20 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 5 Feb 2016 10:20:28 +0000 (11:20 +0100)
plomlombot.py

index b95bb42499f2f99f3c701b869d4ac84670efcc8b..0dd9823612d83c84a54e3e935197589f88ea3d15 100755 (executable)
@@ -246,7 +246,7 @@ def handle_command(command, argument, notice, target, session):
     def twt():
         def try_open(mode):
             try:
-                twtfile = open(session.twtfile, "w")
+                twtfile = open(session.twtfile, mode)
             except (PermissionError, FileNotFoundError) as err:
                 notice("CAN'T ACCESS OR CREATE TWT FILE: " + str(err))
                 return None