Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
227b1204
Commit
227b1204
authored
Aug 17, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert some old-style string exceptions to class exceptions.
parent
9b8d801c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
12 deletions
+17
-12
Lib/aifc.py
Lib/aifc.py
+2
-1
Lib/audiodev.py
Lib/audiodev.py
+2
-1
Lib/binhex.py
Lib/binhex.py
+2
-1
Lib/copy.py
Lib/copy.py
+3
-2
Lib/ftplib.py
Lib/ftplib.py
+6
-6
Lib/multifile.py
Lib/multifile.py
+2
-1
No files found.
Lib/aifc.py
View file @
227b1204
...
...
@@ -137,7 +137,8 @@ writeframesraw.
import
struct
import
__builtin__
Error
=
'aifc.Error'
class
Error
(
Exception
):
pass
_AIFC_version
=
0xA2805140
# Version 1 of AIFF-C
...
...
Lib/audiodev.py
View file @
227b1204
"""Classes for manipulating audio devices (currently only for Sun and SGI)"""
error
=
'audiodev.error'
class
error
(
Exception
):
pass
class
Play_Audio_sgi
:
# Private instance variables
...
...
Lib/binhex.py
View file @
227b1204
...
...
@@ -27,7 +27,8 @@ import struct
import
string
import
binascii
Error
=
'binhex.Error'
class
Error
(
Exception
):
pass
# States (what have we written)
[
_DID_HEADER
,
_DID_DATA
,
_DID_RSRC
]
=
range
(
3
)
...
...
Lib/copy.py
View file @
227b1204
...
...
@@ -52,8 +52,9 @@ __getstate__() and __setstate__(). See the documentation for module
import
types
error
=
'copy.error'
Error
=
error
# backward compatibility
class
Error
(
Exception
):
pass
error
=
Error
# backward compatibility
def
copy
(
x
):
"""Shallow copy operation on arbitrary Python objects.
...
...
Lib/ftplib.py
View file @
227b1204
...
...
@@ -56,16 +56,16 @@ FTP_PORT = 21
# Exception raised when an error or invalid response is received
error_reply
=
'ftplib.error_reply'
# unexpected [123]xx reply
error_temp
=
'ftplib.error_temp'
# 4xx errors
error_perm
=
'ftplib.error_perm'
# 5xx errors
error_proto
=
'ftplib.error_proto'
# response does not begin with [1-5]
class
Error
(
Exception
):
pass
class
error_reply
(
Error
):
pass
# unexpected [123]xx reply
class
error_temp
(
Error
):
pass
# 4xx errors
class
error_perm
(
Error
):
pass
# 5xx errors
class
error_proto
(
Error
):
pass
# response does not begin with [1-5]
# All exceptions (hopefully) that may be raised here and that aren't
# (always) programming errors on our side
all_errors
=
(
error_reply
,
error_temp
,
error_perm
,
error_proto
,
\
socket
.
error
,
IOError
,
EOFError
)
all_errors
=
(
Error
,
socket
.
error
,
IOError
,
EOFError
)
# Line terminators (we always output CRLF, but accept any of CRLF, CR, LF)
...
...
Lib/multifile.py
View file @
227b1204
...
...
@@ -30,7 +30,8 @@ seekable stream object.
import
sys
import
string
Error
=
'multifile.Error'
class
Error
(
Exception
):
pass
class
MultiFile
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment