still testing²²²²²
This commit is contained in:
5
main.py
5
main.py
@@ -3,6 +3,7 @@ import os.path
|
||||
import docker
|
||||
import restic
|
||||
import yaml
|
||||
import json
|
||||
import configparser
|
||||
|
||||
|
||||
@@ -112,7 +113,7 @@ def yaml_to_services_list(filepath: str) -> dict|None:
|
||||
for dependance in ycontent["services"]["depends_on"]:
|
||||
mustbefore.append(dependance)
|
||||
|
||||
serviceslist[servicename] = {"must_before": mustbefore, "must_after": None, "backupdone": False}
|
||||
serviceslist[servicename] = {"must_before": mustbefore, "must_after": [], "backupdone": False}
|
||||
|
||||
# on reparcourt une seconde fois pour définir de quels services ilssont les dépendances
|
||||
for service in serviceslist:
|
||||
@@ -180,4 +181,4 @@ if __name__ == '__main__':
|
||||
|
||||
#read_config_file()
|
||||
|
||||
print(yaml_to_services_list(composefile))
|
||||
print(json.dump(yaml_to_services_list(composefile), indent=4))
|
||||
|
||||
Reference in New Issue
Block a user