make it simpler
This commit is contained in:
13
lld_backup_status_file.py
Executable file
13
lld_backup_status_file.py
Executable 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))
|
||||
Reference in New Issue
Block a user