tfix saving request: binary flag is needed on windows - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 820d356325ca45977819123e6486e6183e9b97d5 DIR parent 78ce20b0b8461c84bd40d039b3346a448a9e810f HTML Author: ThomasV <thomasv@gitorious> Date: Sat, 31 Jan 2015 20:25:12 +0100 fix saving request: binary flag is needed on windows Diffstat: M lib/paymentrequest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py t@@ -110,7 +110,7 @@ class PaymentRequest: self.id = bitcoin.sha256(r)[0:16].encode('hex') filename = os.path.join(self.dir_path, self.id) - with open(filename,'w') as f: + with open(filename,'wb') as f: f.write(r) return self.parse(r) t@@ -125,7 +125,7 @@ class PaymentRequest: def read_file(self, key): filename = os.path.join(self.dir_path, key) - with open(filename,'r') as f: + with open(filename,'rb') as f: r = f.read() assert key == bitcoin.sha256(r)[0:16].encode('hex')