Avoid a portability problem.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 25 Oct 2012 11:34:32 +0000 (07:34 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 25 Oct 2012 11:34:32 +0000 (07:34 -0400)
irkerd

diff --git a/irkerd b/irkerd
index 23038afecad17f971c747f1bdaf76425bb6356ab..2aefe145c197e8d49260c098d23d99185bac88f3 100755 (executable)
--- 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: