action_sync: handle IPv6 [ip] in SYNC
authorZac Medico <zmedico@gentoo.org>
Fri, 25 Feb 2011 05:58:44 +0000 (21:58 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 25 Feb 2011 05:58:44 +0000 (21:58 -0800)
This will fix bug #356375.

pym/_emerge/actions.py

index 8330c04845d151e70bedf8ed39e8cf4196ff176b..1b3b18157dd3cc2a1644ba68482cd1550de296b3 100644 (file)
@@ -2089,7 +2089,8 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
 
                retries=0
                proto, user_name, hostname, port = re.split(
-                       "(rsync|ssh)://([^:/]+@)?([^:/]*)(:[0-9]+)?", syncuri, maxsplit=4)[1:5]
+                       r"(rsync|ssh)://([^:/]+@)?(\[[:\da-fA-F]*\]|[^:/]*)(:[0-9]+)?",
+                       syncuri, maxsplit=4)[1:5]
                if port is None:
                        port=""
                if user_name is None: