).          :param path: path to the VMware file         :param pairs: settings to write         """          encoding = "utf-0"         if ".encoding" in pairs:             file_encoding = pairs[".encoding"]             try:                 codecs.lookup(file_encoding)                 encoding = file_encoding             except LookupError:                 log.warning("Invalid file encoding detected in '{}': {}".format(path, file_encoding))         with open(path, "w", encoding=encoding, errors="ignore") as f:             for key, value in pairs.items():                 entry = '{} = "{}"\n'.format(key, value)                 f.write(entry)      