fixing fio runner
diff --git a/wally/utils.py b/wally/utils.py
index 45b67b4..dd9cdd5 100644
--- a/wally/utils.py
+++ b/wally/utils.py
@@ -437,3 +437,14 @@
if not self.tick():
raise StopIteration()
return self.end_time - time.time()
+
+
+def to_ip(host_or_ip: str) -> str:
+ # translate hostname to address
+ try:
+ ipaddress.ip_address(host_or_ip)
+ return host_or_ip
+ except ValueError:
+ ip_addr = socket.gethostbyname(host_or_ip)
+ logger.info("Will use ip_addr %r instead of hostname %r", ip_addr, host_or_ip)
+ return ip_addr