From: Christian Heller Date: Fri, 5 Feb 2016 10:20:28 +0000 (+0100) Subject: Fix bug overwriting all but last twts. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/condition_descriptions?a=commitdiff_plain;h=dbd33537ffac07005111582d2b1e57fdb89e686a;p=plomlombot-irc.git Fix bug overwriting all but last twts. --- diff --git a/plomlombot.py b/plomlombot.py index b95bb42..0dd9823 100755 --- a/plomlombot.py +++ b/plomlombot.py @@ -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