librabbitmq
librabbitmq copied to clipboard
librabbitmq errors on IPv6 address
In iniit.py for rabbit mq qt line 191:
host, port = host.split(':')
Fails with ipv6 addresses, (e.g. amqp://user:password@[fe80::1]:4572/)
any proposed fix for that?
I found a robust parser here: http://rosettacode.org/wiki/Parse_an_IP_Address#Python that might work. I wish there was a simple way, but my limited regex expertise isn't gracing me with anything simple method to match ports and hosts in both ipv4 addresses and ipv6 addresses in brackets.
Also, I suppose this assumes whatever is downstream for 'host' can handle the ipv6 address. If not, maybe the py2 backport of the ipaddress module can help.