diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 1993-03-29 10:49:59 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 1993-03-29 10:49:59 (GMT) |
commit | 8562c4cee6a8b2fac329bb977e38f089e01597b6 (patch) | |
tree | 88fb61d930326c9f0329a302ca4ef751ab0b4351 /Lib/plat-irix5/cddb.py | |
parent | 9bfef44d97d1ae24e03717e3d59024b44626a9de (diff) | |
download | cpython-8562c4cee6a8b2fac329bb977e38f089e01597b6.zip cpython-8562c4cee6a8b2fac329bb977e38f089e01597b6.tar.gz cpython-8562c4cee6a8b2fac329bb977e38f089e01597b6.tar.bz2 |
Added some error checking.
Diffstat (limited to 'Lib/plat-irix5/cddb.py')
-rwxr-xr-x | Lib/plat-irix5/cddb.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/plat-irix5/cddb.py b/Lib/plat-irix5/cddb.py index 7531312..d07a63e 100755 --- a/Lib/plat-irix5/cddb.py +++ b/Lib/plat-irix5/cddb.py @@ -87,7 +87,16 @@ class Cddb(): if self.toc != value: print 'toc\'s don\'t match' elif name1[:5] == 'track': - trackno = string.atoi(name1[5:]) + try: + trackno = string.atoi(name1[5:]) + except strings.atoi_error: + print 'syntax error in ' + file + continue + if trackno > ntracks: + print 'track number ' + trackno + \ + ' in file ' + file + \ + ' out of range' + continue self.track[trackno] = value f.close() return self |