Commit 15354b87 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou Committed by Georgios D. Tsoukalas
Browse files

common: more improvements in join_urls

parent 0e3f5c1b
......@@ -64,7 +64,16 @@ def join_urls(*args):
'path1/'
>>> join_urls("path1/", "path2", "path3")
'path1/path2/path3'
>>> join_urls("", "path2", "path3")
'path2/path3'
>>> join_urls("", "", "")
''
"""
args = filter(bool, args)
if len(args) == 0:
return ''
if len(args) == 1:
return args[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment