MCPcopy
hub / github.com/AdnanHodzic/auto-cpufreq / root_check

Function root_check

auto_cpufreq/core.py:430–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

428 sys.exit("ERROR:\n\nCouldn't find any of the necessary scaling governors.\n")
429
430def root_check():
431 if not os.geteuid() == 0:
432 print("\n" + "-" * 33 + " Root check " + "-" * 34 + "\n")
433 print("ERROR:\n\nMust be run root for this functionality to work, i.e: \nsudo " + app_name)
434 footer()
435 exit(1)
436
437def countdown(s):
438 # Fix for wrong stats output and "TERM environment variable not set"

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 1

footerFunction · 0.85

Tested by

no test coverage detected