mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
21 lines
958 B
Diff
21 lines
958 B
Diff
diff -r 072562663a50 tryton/gui/main.py
|
|
--- ./tryton/tryton/gui/main.py Fri May 09 10:13:53 2014 +0200
|
|
+++ ./tryton/tryton/gui/main.py Sat May 24 18:14:02 2014 +0200
|
|
@@ -1420,10 +1420,12 @@
|
|
if not urlp.scheme == 'tryton':
|
|
return
|
|
urlp = urlparse('http' + url[6:])
|
|
- hostname, port = map(urllib.unquote,
|
|
- (urlp.netloc.split(':', 1) + [CONFIG.defaults['login.port']])[:2])
|
|
- database, path = map(urllib.unquote,
|
|
- (urlp.path[1:].split('/', 1) + [None])[:2])
|
|
+ hostname = urllib.unquote(urlp.hostname or
|
|
+ CONFIG.defaults['login.server'])
|
|
+ port = urlp.port or str(CONFIG.defaults['login.port'])
|
|
+ path = urlp.path[1:].split('/', 1)
|
|
+ database = urllib.unquote(path.pop(0))
|
|
+ path = path and urllib.unquote(path[0]) or ""
|
|
if (not path or
|
|
hostname != rpc._HOST or
|
|
int(port) != rpc._PORT or
|
|
)
|