juju-deployer address,port split not working with ipv6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-jujuclient |
Fix Committed
|
Undecided
|
Liam Young |
Bug Description
Hi
When using juju-deployer in an ipv6 environment, I get an error rendering juju-deployer useless. I suspect this is due to a too optimistic way of splitting an address in server and port part.
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
run()
File "/usr/lib/
importer.
File "/usr/lib/
self.
File "/usr/lib/
self.client = EnvironmentClie
File "/usr/lib/
return Connector(
File "/usr/lib/
address = self.get_
File "/usr/lib/
if self.is_
File "/usr/lib/
address, port = server.split(":")
ValueError: too many values to unpack
I don't seem to get this error when connecting over ipv4
Related branches
- Kapil Thangavelu: Approve
- Martin Packman (community): Approve
-
Diff: 64 lines (+33/-1)2 files modifiedjujuclient.py (+11/-1)
test_jujuclient.py (+22/-0)
Changed in python-jujuclient: | |
assignee: | nobody → Liam Young (gnuoy) |
status: | New → Confirmed |
Changed in python-jujuclient: | |
status: | Confirmed → Fix Committed |
Changing line 223 in/usr/ lib/python2. 7/dist- packages/ jujuclient. py to
address, port = server.rsplit(":", 1) translate( None, '[]')
address = address.
seems to fix it. I'm not sure if that will work in all cases...