mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Update cherrypy-18.6.1
This commit is contained in:
parent
b3ae6bd695
commit
ebffd124f6
57 changed files with 1269 additions and 1509 deletions
|
@ -1,10 +1,6 @@
|
|||
import sys
|
||||
import imp
|
||||
import types
|
||||
import importlib
|
||||
|
||||
import six
|
||||
|
||||
import cherrypy
|
||||
from cherrypy.test import helper
|
||||
|
||||
|
@ -27,7 +23,7 @@ class TutorialTest(helper.CPWebCase):
|
|||
"""
|
||||
target = 'cherrypy.tutorial.' + name
|
||||
if target in sys.modules:
|
||||
module = imp.reload(sys.modules[target])
|
||||
module = importlib.reload(sys.modules[target])
|
||||
else:
|
||||
module = importlib.import_module(target)
|
||||
return module
|
||||
|
@ -39,8 +35,6 @@ class TutorialTest(helper.CPWebCase):
|
|||
root = getattr(module, root_name)
|
||||
conf = getattr(module, 'tutconf')
|
||||
class_types = type,
|
||||
if six.PY2:
|
||||
class_types += types.ClassType,
|
||||
if isinstance(root, class_types):
|
||||
root = root()
|
||||
cherrypy.tree.mount(root, config=conf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue