Moving "rpc" addition to transmission host string after exception
This commit is contained in:
Wiltons
2014-11-11 23:29:38 +00:00
parent d0baeec53d
commit b467e2db41

View File

@@ -143,12 +143,12 @@ def torrentAction(method, arguments):
i = host.rfind(':')
if i >= 0:
possible_port = host[i + 1:]
host = host + "/rpc"
try:
port = int(possible_port)
if port:
host = host + "/transmission/rpc"
except ValueError:
host = host + "/rpc"
logger.debug('No port, assuming not transmission')
else:
logger.error('Transmission port missing')