1
0
forked from drath/libratbag

Use 'a != b' instead of 'not a == b'

This commit is contained in:
Yaroslav Chvanov
2023-03-02 05:00:45 +03:00
parent 80fa7f5b8f
commit 27d74ae0f0
3 changed files with 4 additions and 2 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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)