Commit c7062cee authored by Xavier Thompson's avatar Xavier Thompson

promise/plugin: Fix check_socket_listening promise

Accept unicode value for `port` parameter
parent 9c8b7a69
Pipeline #16359 passed with stage
in 0 seconds
...@@ -30,7 +30,8 @@ class RunPromise(GenericPromise): ...@@ -30,7 +30,8 @@ class RunPromise(GenericPromise):
if path or abstract or not port: if path or abstract or not port:
self.logger.error(ADDRESS_USAGE) self.logger.error(ADDRESS_USAGE)
return return
family, _, _, _, addr = socket.getaddrinfo(host, port)[0] # type of port must be int or str, unicode is not accepted.
family, _, _, _, addr = socket.getaddrinfo(host, int(port))[0]
else: else:
if bool(path) == bool(abstract): if bool(path) == bool(abstract):
self.logger.error(ADDRESS_USAGE) self.logger.error(ADDRESS_USAGE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment