subprocess: lru_cache version checks

This commit is contained in:
James R. Barlow
2020-06-10 00:32:06 -07:00
parent 64891c2fc3
commit f6257c2183
+1
View File
@@ -105,6 +105,7 @@ def _fix_windows_args(program, args, env):
return args
@lru_cache(maxsize=None)
def get_version(program, *, version_arg='--version', regex=r'(\d+(\.\d+)*)', env=None):
"""Get the version of the specified program"""
args_prog = [program, version_arg]