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
9b8d801c
Commit
9b8d801c
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
de9fec5f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
6 deletions
+14
-6
Lib/sunau.py
Lib/sunau.py
+2
-1
Lib/sunaudio.py
Lib/sunaudio.py
+2
-1
Lib/toaiff.py
Lib/toaiff.py
+2
-1
Lib/tokenize.py
Lib/tokenize.py
+4
-1
Lib/uu.py
Lib/uu.py
+2
-1
Lib/wave.py
Lib/wave.py
+2
-1
No files found.
Lib/sunau.py
View file @
9b8d801c
...
...
@@ -128,7 +128,8 @@ _simple_encodings = [AUDIO_FILE_ENCODING_MULAW_8,
AUDIO_FILE_ENCODING_LINEAR_32
,
AUDIO_FILE_ENCODING_ALAW_8
]
Error
=
'sunau.Error'
class
Error
(
Exception
):
pass
def
_read_u32
(
file
):
x
=
0L
...
...
Lib/sunaudio.py
View file @
9b8d801c
...
...
@@ -2,7 +2,8 @@
MAGIC
=
'.snd'
error
=
'sunaudio sound header conversion error'
class
error
(
Exception
):
pass
def
get_long_be
(
s
):
...
...
Lib/toaiff.py
View file @
9b8d801c
...
...
@@ -53,7 +53,8 @@ uncompress = pipes.Template()
uncompress
.
append
(
'uncompress'
,
'--'
)
error
=
'toaiff.error'
# Exception
class
error
(
Exception
):
pass
def
toaiff
(
filename
):
temps
=
[]
...
...
Lib/tokenize.py
View file @
9b8d801c
...
...
@@ -76,7 +76,10 @@ endprogs = {"'": re.compile(Single), '"': re.compile(Double),
"R'''": single3prog, 'R"""': double3prog, 'r': None, 'R': None}
tabsize = 8
TokenError = 'TokenError'
class TokenError(Exception):
pass
def printtoken(type, token, (srow, scol), (erow, ecol), line): # for testing
print "%d,%d-%d,%d:\t%s\t%s" % \
(srow, scol, erow, ecol, tok_name[type], repr(token))
...
...
Lib/uu.py
View file @
9b8d801c
...
...
@@ -35,7 +35,8 @@ import os
import
string
import
sys
Error
=
'uu.Error'
class
Error
(
Exception
):
pass
def
encode
(
in_file
,
out_file
,
name
=
None
,
mode
=
None
):
"""Uuencode file"""
...
...
Lib/wave.py
View file @
9b8d801c
...
...
@@ -73,7 +73,8 @@ is destroyed.
import
__builtin__
Error
=
'wave.Error'
class
Error
(
Exception
):
pass
WAVE_FORMAT_PCM
=
0x0001
...
...
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