Skip to content

Commit

Permalink
fixes ratt-ru/radiopadre#113 better
Browse files Browse the repository at this point in the history
  • Loading branch information
o-smirnov committed Nov 18, 2021
1 parent efa99da commit 1eb39e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iglesia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,12 @@ def set_userside_ports(userside_ports):

def get_carta_url(*args):
url = f"http://localhost:{CARTA_PORT}"
args = list(args)

if CARTA_VERSION < "2":
args = [f"socketUrl=ws://localhost:{CARTA_WS_PORT}"] + list(args)
args += [f"token={uuid.UUID(SESSION_ID)}"]
args = [f"socketUrl=ws://localhost:{CARTA_WS_PORT}"] + args
else:
args = [f"token={uuid.UUID(SESSION_ID)}"] + args

if args:
return f"{url}?{'&'.join(args)}"
Expand Down

0 comments on commit 1eb39e4

Please sign in to comment.