Convert some old-style string exceptions to class exceptions.

This commit is contained in:
Fred Drake 2000-08-18 14:59:33 +00:00
parent b65b006595
commit def003845b
8 changed files with 20 additions and 10 deletions

View File

@ -12,7 +12,8 @@ SPLITLINE = '--------------------'
FORMLINE = '=============== FORM ==============='
ENDLINE = '=============================='
error = 'flp.error'
class error(Exception):
pass
##################################################################
# Part 1 - The parsing routines #

View File

@ -5,7 +5,8 @@
# XXX It appears that compressing grayscale images doesn't work right;
# XXX the resulting file causes weirdness.
error = 'jpeg.error' # Exception
class error(Exception):
pass
options = {'quality': 75, 'optimize': 0, 'smooth': 0, 'forcegray': 0}

View File

@ -2,8 +2,10 @@
import cd, CD
Error = 'Readcd.Error'
_Stop = 'Readcd.Stop'
class Error(Exception):
pass
class _Stop(Exception):
pass
def _doatime(self, cb_type, data):
if ((data[0] * 60) + data[1]) * 75 + data[2] > self.end:

View File

@ -50,7 +50,8 @@ uncompress = pipes.Template()
uncompress.append('uncompress', '--')
error = 'torgb.error' # Exception
class error(Exception):
pass
def torgb(filename):
temps = []

View File

@ -12,7 +12,8 @@ SPLITLINE = '--------------------'
FORMLINE = '=============== FORM ==============='
ENDLINE = '=============================='
error = 'flp.error'
class error(Exception):
pass
##################################################################
# Part 1 - The parsing routines #

View File

@ -5,7 +5,8 @@
# XXX It appears that compressing grayscale images doesn't work right;
# XXX the resulting file causes weirdness.
error = 'jpeg.error' # Exception
class error(Exception):
pass
options = {'quality': 75, 'optimize': 0, 'smooth': 0, 'forcegray': 0}

View File

@ -2,8 +2,10 @@
import cd, CD
Error = 'Readcd.Error'
_Stop = 'Readcd.Stop'
class Error(Exception):
pass
class _Stop(Exception):
pass
def _doatime(self, cb_type, data):
if ((data[0] * 60) + data[1]) * 75 + data[2] > self.end:

View File

@ -50,7 +50,8 @@ uncompress = pipes.Template()
uncompress.append('uncompress', '--')
error = 'torgb.error' # Exception
class error(Exception):
pass
def torgb(filename):
temps = []