Always pass string to urllib.unquote

When there is no trailing '/', it adds None which is not supported by
urllib.unquote.

issue4589
review12981002
This commit is contained in:
Cédric Krier committed 2015-03-02 23:02:34 +01:00
1 parent c53357263e
commit e1c3caae8e
1 file changed
+1 -1
+1 -1
View File
@@ -1438,7 +1438,7 @@ class Main(object):
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])
(urlp.path[1:].split('/', 1) + [''])[:2])
if (not path or
hostname != rpc._HOST or
int(port) != rpc._PORT or