Last active
July 30, 2019 04:23
-
-
Save yosshy/908f324eee410bdfe38d8b8b87f90113 to your computer and use it in GitHub Desktop.
Fix IPv6 config in Monasca APIs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/monasca_api/conf/types.py b/monasca_api/conf/types.py | |
index 5edc56b..a5180e4 100644 | |
--- a/monasca_api/conf/types.py | |
+++ b/monasca_api/conf/types.py | |
@@ -36,7 +36,7 @@ class HostAddressPortType(types.HostAddress): | |
super(HostAddressPortType, self).__init__(version, type_name=type_name) | |
def __call__(self, value): | |
- addr, port = value.split(':') | |
+ addr, port = value.rsplit(':', 1) | |
addr = self.validate_addr(addr) | |
port = self._validate_port(port) | |
if not addr and not port: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment