make it simpler

This commit is contained in:
2025-03-03 14:53:30 +01:00
parent ce9e8dce54
commit ce57937ebe
16 changed files with 1 additions and 54 deletions

13
lld_backup_status_file.py Executable file
View File

@@ -0,0 +1,13 @@
#jinja2:variable_start_string:'[%',variable_end_string:'%]',comment_start_string:'<%',comment_end_string:'%>'
#! [% discovered_interpreter_python %]
import glob
import json
if __name__ == "__main__":
# Iterate over all block devices, but ignore them if they are in the
# skippable set
skippable = ()
data=[]
files=(file for file in glob.glob( "/var/run/*.status" ))
data = [{"{#STATUSFILE}": file} for file in files]
print(json.dumps({"data": data}, indent=4))