monolith/utils/getrelay.py

13 lines
358 B
Python
Raw Normal View History

import main
def getRelay(num):
host = main.config["Relay"]["Host"].replace("x", str(num))
port = int(str(main.config["Relay"]["Port"]).replace("x", str(num)))
user = main.config["Relay"]["User"]
password = main.config["Relay"]["Password"]
try:
port = int(port)
except ValueError:
return False
return [host, port]