monolith/legacy/utils/get.py

14 lines
372 B
Python
Raw Permalink Normal View History

import main
2022-07-21 12:39:41 +00:00
def getRelay(num):
host = main.config["Relay"]["Host"].replace("x", str(num))
port = int(str(main.config["Relay"]["Port"]).replace("x", str(num).zfill(2)))
2022-07-21 12:40:05 +00:00
# user = main.config["Relay"]["User"]
# password = main.config["Relay"]["Password"]
try:
port = int(port)
except ValueError:
return False
return (host, port)