From: Eric S. Raymond Date: Thu, 25 Oct 2012 11:34:32 +0000 (-0400) Subject: Avoid a portability problem. X-Git-Tag: 1.13~4 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a133293c18bfb79b5e01b153d2cd0fa8692114b6;p=irker.git Avoid a portability problem. --- diff --git a/irkerd b/irkerd index 23038af..2aefe14 100755 --- a/irkerd +++ b/irkerd @@ -282,6 +282,8 @@ class Connection: class Target(): "Represent a transmission target." def __init__(self, url): + # Pre-2.6 Pythons don't recognize irc: as a valid URL prefix. + url = url.replace("irc://", "http://") parsed = urlparse.urlparse(url) irchost, _, ircport = parsed.netloc.partition(':') if not ircport: