mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Fix import error when compiling without OpenSSL support
This commit is contained in:
parent
1d2ba26e26
commit
883f1b1c28
@ -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
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user