diff options
Diffstat (limited to 'iw/autopart_type.py')
-rw-r--r-- | iw/autopart_type.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/iw/autopart_type.py b/iw/autopart_type.py index fb5e5f29a..39d099658 100644 --- a/iw/autopart_type.py +++ b/iw/autopart_type.py @@ -295,10 +295,17 @@ class PartitionTypeWindow(InstallWindow): err = None try: - idx = target.rfind(":") + count = len(target.split(":")) + idx = target.rfind("]:") + # Check for IPV6 [IPV6-ip]:port if idx != -1: + ip = target[1:idx] + port = target[idx+2:] + # Check for IPV4 aaa.bbb.ccc.ddd:port + elif count == 2: + idx = target.rfind(":") ip = target[:idx] - port = target[idx:] + port = target[idx+1:] else: ip = target port = "3260" |