Fix bug whne try to open the client with an URL
This commit is contained in:
parent
b7e89dfb71
commit
19b3399d0f
|
@ -0,0 +1,21 @@
|
|||
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
|
||||
)
|
Loading…
Reference in New Issue