def GetDirmap(input_tmp):
    dirmap = {}
    for (device_path, target_files_rel_paths) in DIR_SEARCH_PATHS.items():
        for target_files_rel_path in target_files_rel_paths:
            target_files_path = os.path.join(input_tmp, target_files_rel_path)
            if os.path.isdir(target_files_path):
                dirmap[device_path] = target_files_path
                break
        if (device_path not in dirmap):
            raise ValueError(((("Can't determine path for device path " + device_path) + '. Searched the following:') + '\n'.join(target_files_rel_paths)))
    return dirmap
def GetDirmap(input_tmp):
    dirmap = {}
    for (device_path, target_files_rel_paths) in DIR_SEARCH_PATHS.items():
        for target_files_rel_path in target_files_rel_paths:
            target_files_path = os.path.join(input_tmp, target_files_rel_path)
            if os.path.isdir(target_files_path):
                dirmap[device_path] = target_files_path
                break
        if (device_path not in dirmap):
            raise ValueError(((("Can't determine path for device path " + device_path) + '. Searched the following:') + '\n'.join(target_files_rel_paths)))
    return dirmap