git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
c45fa48
)
use a regexp for the ssl bug workaround
author
ThomasV
<thomasv@gitorious>
Tue, 8 Oct 2013 11:24:54 +0000 (13:24 +0200)
committer
ThomasV
<thomasv@gitorious>
Tue, 8 Oct 2013 11:24:54 +0000 (13:24 +0200)
lib/interface.py
patch
|
blob
|
history
diff --git
a/lib/interface.py
b/lib/interface.py
index
d788700
..
cc1553a
100644
(file)
--- a/
lib/interface.py
+++ b/
lib/interface.py
@@
-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)