Commit def00384 authored by Fred Drake's avatar Fred Drake

Convert some old-style string exceptions to class exceptions.

parent b65b0065
...@@ -12,7 +12,8 @@ SPLITLINE = '--------------------' ...@@ -12,7 +12,8 @@ SPLITLINE = '--------------------'
FORMLINE = '=============== FORM ===============' FORMLINE = '=============== FORM ==============='
ENDLINE = '==============================' ENDLINE = '=============================='
error = 'flp.error' class error(Exception):
pass
################################################################## ##################################################################
# Part 1 - The parsing routines # # Part 1 - The parsing routines #
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
# XXX It appears that compressing grayscale images doesn't work right; # XXX It appears that compressing grayscale images doesn't work right;
# XXX the resulting file causes weirdness. # XXX the resulting file causes weirdness.
error = 'jpeg.error' # Exception class error(Exception):
pass
options = {'quality': 75, 'optimize': 0, 'smooth': 0, 'forcegray': 0} options = {'quality': 75, 'optimize': 0, 'smooth': 0, 'forcegray': 0}
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
import cd, CD import cd, CD
Error = 'Readcd.Error' class Error(Exception):
_Stop = 'Readcd.Stop' pass
class _Stop(Exception):
pass
def _doatime(self, cb_type, data): def _doatime(self, cb_type, data):
if ((data[0] * 60) + data[1]) * 75 + data[2] > self.end: if ((data[0] * 60) + data[1]) * 75 + data[2] > self.end:
......
...@@ -50,7 +50,8 @@ uncompress = pipes.Template() ...@@ -50,7 +50,8 @@ uncompress = pipes.Template()
uncompress.append('uncompress', '--') uncompress.append('uncompress', '--')
error = 'torgb.error' # Exception class error(Exception):
pass
def torgb(filename): def torgb(filename):
temps = [] temps = []
......
...@@ -12,7 +12,8 @@ SPLITLINE = '--------------------' ...@@ -12,7 +12,8 @@ SPLITLINE = '--------------------'
FORMLINE = '=============== FORM ===============' FORMLINE = '=============== FORM ==============='
ENDLINE = '==============================' ENDLINE = '=============================='
error = 'flp.error' class error(Exception):
pass
################################################################## ##################################################################
# Part 1 - The parsing routines # # Part 1 - The parsing routines #
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
# XXX It appears that compressing grayscale images doesn't work right; # XXX It appears that compressing grayscale images doesn't work right;
# XXX the resulting file causes weirdness. # XXX the resulting file causes weirdness.
error = 'jpeg.error' # Exception class error(Exception):
pass
options = {'quality': 75, 'optimize': 0, 'smooth': 0, 'forcegray': 0} options = {'quality': 75, 'optimize': 0, 'smooth': 0, 'forcegray': 0}
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
import cd, CD import cd, CD
Error = 'Readcd.Error' class Error(Exception):
_Stop = 'Readcd.Stop' pass
class _Stop(Exception):
pass
def _doatime(self, cb_type, data): def _doatime(self, cb_type, data):
if ((data[0] * 60) + data[1]) * 75 + data[2] > self.end: if ((data[0] * 60) + data[1]) * 75 + data[2] > self.end:
......
...@@ -50,7 +50,8 @@ uncompress = pipes.Template() ...@@ -50,7 +50,8 @@ uncompress = pipes.Template()
uncompress.append('uncompress', '--') uncompress.append('uncompress', '--')
error = 'torgb.error' # Exception class error(Exception):
pass
def torgb(filename): def torgb(filename):
temps = [] temps = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment