diff --git a/source/core.py b/source/core.py index 9b376e5..3b3e322 100644 --- a/source/core.py +++ b/source/core.py @@ -42,14 +42,18 @@ def turbo(value: bool = None): f = cpufreq inverse = False else: - print("Error: cpu boost is not available") - return None + print("Warning: CPU turbo is not available") + return False if value is not None: if inverse: value = not value - f.write_text(str(int(value)) + "\n") + try: + f.write_text(str(int(value)) + "\n") + except PermissionError: + print("Warning: Changing CPU turbo is not supported. Skipping.") + return False value = bool(int(f.read_text().strip())) if inverse: