Private GIT

Skip to content
Snippets Groups Projects
Commit 3c13f564 authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Fix creating ssl certs, fix a stat error

parent 6752769a
No related branches found
No related tags found
No related merge requests found
......@@ -750,7 +750,7 @@ def chmodAsParent(childPath):
childPathStat = os.stat(childPath.encode(sickbeard.SYS_ENCODING))
childPath_mode = stat.S_IMODE(childPathStat[stat.ST_MODE])
if os.path.isfile(childPath):
if ek(os.path.isfile, childPath):
childMode = fileBitFilter(parentMode)
else:
childMode = parentMode
......@@ -973,8 +973,8 @@ def create_https_certificates(ssl_cert, ssl_key):
try:
# pylint: disable=E1101
# Module has no member
io.open(ssl_key, 'w').write(crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey))
io.open(ssl_cert, 'w').write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert))
io.open(ssl_key, 'wb').write(crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey))
io.open(ssl_cert, 'wb').write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert))
except Exception:
logger.log(u"Error creating SSL key and certificate", logger.ERROR)
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment