From 57232edb2d6a8a5c53280ef0010c5d52ba2bf21c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Jun 2010 16:44:13 -0600 Subject: [PATCH] Fix #5864 (Python string exceptions no more allowed in Python 2.6) --- src/calibre/utils/Zeroconf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/utils/Zeroconf.py b/src/calibre/utils/Zeroconf.py index 8a1e13c23f..f4a7119d16 100755 --- a/src/calibre/utils/Zeroconf.py +++ b/src/calibre/utils/Zeroconf.py @@ -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