Revision 4de960c7 kamaki/clients/utils.py

b/kamaki/clients/utils.py
87 87
    :returns: (str) a path in the form /args[0]/args[1]/...
88 88
    """
89 89

  
90
    path = ''
91
    for arg in args:
92
        suffix = '%s' % arg
93
        try:
94
            while suffix[0] == '/':
95
                suffix = '%s' % suffix[1:]
96
        except IndexError:
97
            continue
98
        if len(path) > 0 and path[-1] == '/':
99
            path += '%s' % suffix
100
        else:
101
            path += '/%s' % suffix
102
    return path
90
    return '/'.join([''] + [arg.decode('utf-8') if (
91
        isinstance(arg, str)) else '%s' % arg for arg in args])
103 92

  
104 93

  
105 94
def params4url(params):

Also available in: Unified diff