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 #del func
##################################################################### #####################################################################
from panda3d.core import HTTPChannel from panda3d import core
from .extension_native_helpers import Dtool_funcToMethod from .extension_native_helpers import Dtool_funcToMethod
""" """
@ -26,8 +26,10 @@ def spawnTask(self, name = None, callback = None, extraArgs = []):
task = Task.Task(self.doTask) task = Task.Task(self.doTask)
task.callback = callback task.callback = callback
task.callbackArgs = extraArgs task.callbackArgs = extraArgs
return taskMgr.add(task, name) return taskMgr.add(task, name)
Dtool_funcToMethod(spawnTask, HTTPChannel)
if hasattr(core, 'HTTPChannel'):
Dtool_funcToMethod(spawnTask, core.HTTPChannel)
del spawnTask del spawnTask
##################################################################### #####################################################################
@ -38,7 +40,8 @@ def doTask(self, task):
if task.callback: if task.callback:
task.callback(*task.callbackArgs) task.callback(*task.callbackArgs)
return Task.done return Task.done
Dtool_funcToMethod(doTask, HTTPChannel) if hasattr(core, 'HTTPChannel'):
Dtool_funcToMethod(doTask, core.HTTPChannel)
del doTask del doTask
##################################################################### #####################################################################