mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-08-30 18:32:50 +00:00
win: ap: add cache to driver identification routine
This commit is contained in:
parent
c38b472336
commit
a36d883800
@ -8,6 +8,7 @@ import os.path
|
|||||||
from binascii import unhexlify
|
from binascii import unhexlify
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
import itertools
|
import itertools
|
||||||
|
import functools
|
||||||
|
|
||||||
|
|
||||||
CRLF = b"\x0d\x0a"
|
CRLF = b"\x0d\x0a"
|
||||||
@ -170,6 +171,7 @@ def make_patch(archive, *,
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
@functools.lru_cache(maxsize=None)
|
||||||
def identify_driver(archive, *, sevenzip="7z"):
|
def identify_driver(archive, *, sevenzip="7z"):
|
||||||
manifest = extract_single_file(archive, "setup.cfg", sevenzip=sevenzip)
|
manifest = extract_single_file(archive, "setup.cfg", sevenzip=sevenzip)
|
||||||
root = ET.fromstring(manifest)
|
root = ET.fromstring(manifest)
|
||||||
|
Loading…
Reference in New Issue
Block a user