meson-extract-unit-files: apply "ruff format"
This commit is contained in:
@@ -6,15 +6,20 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
build_dir = sys.argv[1]
|
build_dir = sys.argv[1]
|
||||||
|
|
||||||
out = subprocess.run(["meson", "introspect", "--installed", build_dir],
|
out = subprocess.run(
|
||||||
stdout=subprocess.PIPE, check=True)
|
['meson', 'introspect', '--installed', build_dir],
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
files = json.loads(out.stdout)
|
files = json.loads(out.stdout)
|
||||||
for file in sorted(files.values()):
|
for file in sorted(files.values()):
|
||||||
if re.search("^/usr/lib/systemd/(system|user)/", file) and not file.endswith(".conf"):
|
if re.search('^/usr/lib/systemd/(system|user)/', file) and not file.endswith('.conf'):
|
||||||
print(file)
|
print(file)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user