mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Replace IOError with OSError (#16715)
This commit is contained in:
parent
16bdd4120d
commit
f7a17b48d7
121 changed files with 381 additions and 386 deletions
|
@ -71,8 +71,8 @@ class FatalIncludeError(SyntaxError):
|
|||
# @return The expanded resource. If the parse mode is "xml", this
|
||||
# is an ElementTree instance. If the parse mode is "text", this
|
||||
# is a Unicode string. If the loader fails, it can return None
|
||||
# or raise an IOError exception.
|
||||
# @throws IOError If the loader fails to load the resource.
|
||||
# or raise an OSError exception.
|
||||
# @throws OSError If the loader fails to load the resource.
|
||||
|
||||
def default_loader(href, parse, encoding=None):
|
||||
if parse == "xml":
|
||||
|
@ -95,7 +95,7 @@ def default_loader(href, parse, encoding=None):
|
|||
# that implements the same interface as <b>default_loader</b>.
|
||||
# @throws FatalIncludeError If the function fails to include a given
|
||||
# resource, or if the tree contains malformed XInclude elements.
|
||||
# @throws IOError If the function fails to load a given resource.
|
||||
# @throws OSError If the function fails to load a given resource.
|
||||
|
||||
def include(elem, loader=None):
|
||||
if loader is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue