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 b95bb42..0dd9823 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