tuse a regexp for the ssl bug workaround - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d2af935fc7d0f5cc81aaa88259050c904c4b8e45 DIR parent c45fa4860fea5ecd1245c6dfe3610208ea014913 HTML Author: ThomasV <thomasv@gitorious> Date: Tue, 8 Oct 2013 13:24:54 +0200 use a regexp for the ssl bug workaround Diffstat: M lib/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- DIR diff --git a/lib/interface.py b/lib/interface.py t@@ -327,7 +327,7 @@ class Interface(threading.Thread): s.close() cert = ssl.DER_cert_to_PEM_cert(dercert) # workaround android bug - cert = cert.replace("==-----END CERTIFICATE-----", "==\n-----END CERTIFICATE-----") + cert = re.sub("([^\n])-----END CERTIFICATE-----","\\1\n-----END CERTIFICATE-----",cert) temporary_path = cert_path + '.temp' with open(temporary_path,"w") as f: f.write(cert)