bugfix
This commit is contained in:
parent
2c57d614d3
commit
bd32b8205e
@ -14,7 +14,10 @@ from .processorResource import ProcessorResource
|
|||||||
from .auth_api import AuthAPI
|
from .auth_api import AuthAPI
|
||||||
from .myTE import setupTemplateEngine
|
from .myTE import setupTemplateEngine
|
||||||
from .globalEnv import initEnv
|
from .globalEnv import initEnv
|
||||||
from natpmp import NATPMP as pmp
|
try:
|
||||||
|
from natpmp import NATPMP as pmp
|
||||||
|
except:
|
||||||
|
pmp = None
|
||||||
|
|
||||||
class ConfiguredServer:
|
class ConfiguredServer:
|
||||||
def __init__(self,auth_klass=AuthAPI):
|
def __init__(self,auth_klass=AuthAPI):
|
||||||
@ -69,7 +72,7 @@ class ConfiguredServer:
|
|||||||
ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
||||||
ssl_context.load_cert_chain(config.website.ssl.crtfile,
|
ssl_context.load_cert_chain(config.website.ssl.crtfile,
|
||||||
config.website.ssl.keyfile)
|
config.website.ssl.keyfile)
|
||||||
if config.natpmp:
|
if pmp and config.natpmp:
|
||||||
self.nat_heartbeat = True
|
self.nat_heartbeat = True
|
||||||
b = Background(self.natpmp_heartbeat)
|
b = Background(self.natpmp_heartbeat)
|
||||||
b.start()
|
b.start()
|
||||||
|
@ -12,3 +12,4 @@ jinja2
|
|||||||
ujson
|
ujson
|
||||||
openpyxl
|
openpyxl
|
||||||
pillow
|
pillow
|
||||||
|
py-natpmp
|
||||||
|
Loading…
Reference in New Issue
Block a user