Issue #18200: Update the stdlib (except tests) to use

ModuleNotFoundError.
This commit is contained in:
Brett Cannon 2013-06-13 20:57:26 -04:00
parent 9702a17a6a
commit 0a140668fa
83 changed files with 144 additions and 158 deletions

View file

@ -1893,7 +1893,7 @@ Here is a list of available topics. Enter any topic name to get more help.
def showtopic(self, topic, more_xrefs=''):
try:
import pydoc_data.topics
except ImportError:
except ModuleNotFoundError:
self.output.write('''
Sorry, topic and keyword documentation is not available because the
module "pydoc_data.topics" could not be found.
@ -1933,7 +1933,7 @@ module "pydoc_data.topics" could not be found.
"""
try:
import pydoc_data.topics
except ImportError:
except ModuleNotFoundError:
return('''
Sorry, topic and keyword documentation is not available because the
module "pydoc_data.topics" could not be found.