From: Eric S. Raymond Date: Thu, 4 Oct 2012 04:47:28 +0000 (-0400) Subject: One of breitenfelds's isinstance() patches was wrong. X-Git-Tag: 1.6~2 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e696a4587f982c0097199b69d5ccba76506c6a44;p=irker.git One of breitenfelds's isinstance() patches was wrong. --- diff --git a/irkerd b/irkerd index 1e11343..2567ccd 100755 --- a/irkerd +++ b/irkerd @@ -391,14 +391,14 @@ class Irker: channels = request['to'] message = request['privmsg'] if not isinstance(channels, (list, unicode)) \ - or not isinstance(message, unicode): + and not isinstance(message, unicode): self.logerr("malformed request - unexpected types: %r" % request) else: if isinstance(channels, unicode): channels = [channels] for url in channels: - if not isinstance(url, unicode): - self.logerr("malformed request - unexpected type: %r" % request) + if not type(url) in (type(""), type(u"")): + self.logerr("malformed request - URL has unexpected type: %r" % url) else: target = Target(url) if not target.valid():