mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-24 17:24:29 +01:00
Fix #1779 - add to PATH only if it isn't present, to avoid exploding the PATH variable each time the function is called
This commit is contained in:
parent
d062c2149a
commit
a261a2d47d
@ -243,6 +243,7 @@ def get_processor_name():
|
||||
if platform.system() == "Windows":
|
||||
return platform.processor()
|
||||
elif platform.system() == "Darwin":
|
||||
if "/usr/sbin" not in os.environ["PATH"].split(os.pathsep):
|
||||
os.environ["PATH"] = os.environ["PATH"] + os.pathsep + "/usr/sbin"
|
||||
command = "sysctl -n machdep.cpu.brand_string"
|
||||
return subprocess.check_output(command, shell=True).decode().strip()
|
||||
|
Loading…
Reference in New Issue
Block a user