def translate_version_str2list(version_str, depth=2):
    """Translates a version string in format 'x[.y[.z[...]]]' into a list of
    numbers"""
    if version_str is None:
        ver = depth * [0]
    else:
        ver = []
        for i in version_str.split('.')[:depth]:
            try:
                i = int(i)
            except:
                i = 0
            ver.append(i)
    return ver
