File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,22 +82,22 @@ def construct(x):
8282 'Construct a RI dictionary from a clientparams dictionary'
8383 return (
8484 'pq' ,
85- # netloc: user:pass@{ host[:port]|process}
85+ # netloc: user:pass@host[:port]
8686 ri .unsplit_netloc ((
8787 x .get ('user' ),
8888 x .get ('password' ),
8989 '[' + x .get ('host' ) + ']' if (
9090 str (x .get ('ipv' , - 1 )) == '6' and ':' in x .get ('host' , '' )
9191 ) else x .get ('host' ),
92- x . get ( 'port' )
92+ None if 'port' not in x else str ( x [ 'port' ] )
9393 )),
94- None if 'database' not in x else (
94+ None if x . get ( 'database' ) is None else (
9595 ri .escape_path_re .sub (x ['database' ], '/' )
9696 ),
97- None if 'settings' not in x else (
97+ None if x . get ( 'settings' ) is None else (
9898 ri .construct_query (x ['settings' ])
9999 ),
100- None if 'path' not in x else construct_path (x ['path' ]),
100+ None if x . get ( 'path' ) is None else construct_path (x ['path' ]),
101101 )
102102
103103def parse (s , fieldproc = ri .unescape ):
You can’t perform that action at this time.
0 commit comments