Merge pull request #1450 from vhaupert/master

Fix platform import, substitute "~" with user's home
This commit is contained in:
Maximilian Hils 2016-07-30 13:50:08 -07:00 committed by GitHub
commit 47f0c21417
2 changed files with 3 additions and 1 deletions

View File

@ -48,6 +48,7 @@ class PEM(tornado.web.RequestHandler):
def get(self): def get(self):
p = os.path.join(self.request.master.options.cadir, self.filename) p = os.path.join(self.request.master.options.cadir, self.filename)
p = os.path.expanduser(p)
self.set_header("Content-Type", "application/x-x509-ca-cert") self.set_header("Content-Type", "application/x-x509-ca-cert")
self.set_header( self.set_header(
"Content-Disposition", "Content-Disposition",

View File

@ -1,8 +1,9 @@
import sys import sys
import re
resolver = None resolver = None
if sys.platform == "linux2": if re.match(r"linux(?:2)?", sys.platform):
from . import linux from . import linux
resolver = linux.Resolver resolver = linux.Resolver
elif sys.platform == "darwin": elif sys.platform == "darwin":