Fix import error when compiling without OpenSSL support

This commit is contained in:
rdb 2015-11-13 20:28:05 +01:00
parent 1d2ba26e26
commit 883f1b1c28

View File

@ -3,7 +3,7 @@
#del func
#####################################################################
from panda3d.core import HTTPChannel
from panda3d import core
from .extension_native_helpers import Dtool_funcToMethod
"""
@ -27,7 +27,9 @@ def spawnTask(self, name = None, callback = None, extraArgs = []):
task.callback = callback
task.callbackArgs = extraArgs
return taskMgr.add(task, name)
Dtool_funcToMethod(spawnTask, HTTPChannel)
if hasattr(core, 'HTTPChannel'):
Dtool_funcToMethod(spawnTask, core.HTTPChannel)
del spawnTask
#####################################################################
@ -39,6 +41,7 @@ def doTask(self, task):
task.callback(*task.callbackArgs)
return Task.done
Dtool_funcToMethod(doTask, HTTPChannel)
if hasattr(core, 'HTTPChannel'):
Dtool_funcToMethod(doTask, core.HTTPChannel)
del doTask
#####################################################################