def create_cmd(parts):
    """Join together a command line represented as list"""
    sane_parts = []
    for part in parts:
        if not isinstance(part, str):
            # note: python subprocess module raises a TypeError instead
            # of converting everything to string
            part = str(part)
        sane_parts.append(part)

    return ' '.join(sane_parts)