From 594b3fb5de3553f7ce8bf156bbc333682c4693c1 Mon Sep 17 00:00:00 2001 From: Thomas L Date: Sat, 30 Dec 2017 11:31:16 +0100 Subject: [PATCH] fix fd mode --- retootbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retootbot.py b/retootbot.py index bf7366c..7f48120 100644 --- a/retootbot.py +++ b/retootbot.py @@ -101,7 +101,7 @@ class RetootBot(object): # If the Mastodon instance returns interesting Errors, add them here: # save state - with os.fdopen(os.open('seen_toots.pickle.part', os.O_WRONLY | os.O_EXCL | os.O_CREAT), 'w') as f: + with os.fdopen(os.open('seen_toots.pickle.part', os.O_WRONLY | os.O_EXCL | os.O_CREAT), 'wb') as f: pickle.dump(self.seen_toots, f) os.rename('seen_toots.pickle.part', 'seen_toots.pickle')