mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Use 'a != b' instead of 'not a == b'
This commit is contained in:
@@ -23,6 +23,8 @@ select = [
|
||||
# flake8-simplify
|
||||
# Use 'key in dict' instead of 'key in dict.keys()'.
|
||||
"SIM118",
|
||||
# Use 'a != b' instead of 'not a == b'.
|
||||
"SIM201",
|
||||
]
|
||||
ignore = [
|
||||
# Line too long.
|
||||
|
||||
@@ -33,7 +33,7 @@ from ratbagctl import RatbagCapabilityError # NOQA
|
||||
|
||||
|
||||
def main(argv, start_ratbagd=True):
|
||||
if not os.geteuid() == 0:
|
||||
if os.geteuid() != 0:
|
||||
sys.exit("Script must be run as root")
|
||||
|
||||
# replaced by meson
|
||||
|
||||
@@ -917,7 +917,7 @@ def parse(input_string):
|
||||
run_ratbagctl_in_subprocess = ns.subprocess
|
||||
start_ratbagd = not ns.use_existing
|
||||
|
||||
if start_ratbagd and not os.geteuid() == 0:
|
||||
if start_ratbagd and os.geteuid() != 0:
|
||||
print("Script must be run as root", file=sys.stderr)
|
||||
sys.exit(77)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user