src/eric7/UI/Previewers/PreviewerHTML.py

branch
eric7
changeset 10373
093dcebe5ecb
parent 10331
c1a2ff7e3575
child 10433
328f3ec4b77a
equal deleted inserted replaced
10372:1444b4bee64b 10373:093dcebe5ecb
698 @return processed HTML (string) 698 @return processed HTML (string)
699 """ 699 """
700 if "sphinx" in sys.modules: 700 if "sphinx" in sys.modules:
701 # Make sure any Sphinx polution of docutils has been removed. 701 # Make sure any Sphinx polution of docutils has been removed.
702 unloadKeys = [ 702 unloadKeys = [
703 k for k in sys.modules.keys() if k.startswith(("docutils", "sphinx")) 703 k for k in sys.modules if k.startswith(("docutils", "sphinx"))
704 ] 704 ]
705 for key in unloadKeys: 705 for key in unloadKeys:
706 sys.modules.pop(key) 706 sys.modules.pop(key)
707 707
708 try: 708 try:

eric ide

mercurial