]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
No need to import exceptions, they are builtins
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 1 Sep 2005 00:45:28 +0000 (00:45 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 1 Sep 2005 00:45:28 +0000 (00:45 +0000)
Lib/asyncore.py
Lib/encodings/__init__.py
Lib/shutil.py

index a2387a1a82b059150971c593498f8b0c46ca2ac4..886c84545b100a6b83fb628431e9cc5967064f06 100644 (file)
@@ -46,7 +46,6 @@ many of the difficult problems for you, making the task of building
 sophisticated high-performance network servers and clients a snap.
 """
 
-import exceptions
 import select
 import socket
 import sys
@@ -61,7 +60,7 @@ try:
 except NameError:
     socket_map = {}
 
-class ExitNow(exceptions.Exception):
+class ExitNow(Exception):
     pass
 
 def read(obj):
index d2e952343fa4e994a1ca0e873285abcd87251dac..8a50ac13e84484cc2d3e67f31ac9e3bf5d26cd72 100644 (file)
@@ -27,7 +27,7 @@ Written by Marc-Andre Lemburg (mal@lemburg.com).
 
 """#"
 
-import codecs, exceptions, types, aliases
+import codecs, types, aliases
 
 _cache = {}
 _unknown = '--unknown--'
@@ -40,8 +40,7 @@ _norm_encoding_map = ('                                              . '
                       '                ')
 _aliases = aliases.aliases
 
-class CodecRegistryError(exceptions.LookupError,
-                         exceptions.SystemError):
+class CodecRegistryError(LookupError, SystemError):
     pass
 
 def normalize_encoding(encoding):
index 14baa71e83a33c2e15ee20c4c63fb7b9a19a4b09..2fca61c164d3bd97abdbb443a8f453a9fa7144b7 100644 (file)
@@ -7,13 +7,12 @@ XXX The functions here don't copy the resource fork or other metadata on Mac.
 import os
 import sys
 import stat
-import exceptions
 from os.path import abspath
 
 __all__ = ["copyfileobj","copyfile","copymode","copystat","copy","copy2",
            "copytree","move","rmtree","Error"]
 
-class Error(exceptions.EnvironmentError):
+class Error(EnvironmentError):
     pass
 
 def copyfileobj(fsrc, fdst, length=16*1024):