mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #5864 (Python string exceptions no more allowed in Python 2.6)
This commit is contained in:
parent
80c85b7483
commit
57232edb2d
@ -596,10 +596,11 @@ class DNSIncoming(object):
|
||||
next = off + 1
|
||||
off = ((len & 0x3F) << 8) | ord(self.data[off])
|
||||
if off >= first:
|
||||
raise 'Bad domain name (circular) at ' + str(off)
|
||||
raise ValueError('Bad domain name (circular) at ' +
|
||||
str(off))
|
||||
first = off
|
||||
else:
|
||||
raise 'Bad domain name at ' + str(off)
|
||||
raise ValueError('Bad domain name at ' + str(off))
|
||||
|
||||
if next >= 0:
|
||||
self.offset = next
|
||||
|
Loading…
x
Reference in New Issue
Block a user