From d23fe74072f0c86b11d5e548186cd997bd93f410 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 26 May 2017 09:30:20 -0700 Subject: [PATCH] add some exception classes to shutil (#1334) --- stdlib/3/shutil.pyi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stdlib/3/shutil.pyi b/stdlib/3/shutil.pyi index 2939a37e6..afb2e8e4f 100644 --- a/stdlib/3/shutil.pyi +++ b/stdlib/3/shutil.pyi @@ -80,9 +80,18 @@ if sys.version_info >= (3, 3): def which(cmd: _Path, mode: int = ..., path: Optional[_Path] = ...) -> Optional[str]: ... -class Error(Exception): ... if sys.version_info >= (3, 4): + class Error(OSError): ... class SameFileError(Error): ... + class SpecialFileError(OSError): ... + class ExecError(OSError): ... + class ReadError(OSError): ... +else: + class Error(EnvironmentError): ... + class SpecialFileError(EnvironmentError): ... + class ExecError(EnvironmentError): ... + class ReadError(EnvironmentError): ... +class RegistryError(Exception): ... def make_archive(base_name: str, format: str, root_dir: _Path = ..., base_dir: _Path = ..., verbose: bool = ...,