mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[enh] Also show diff as needed with --list-pending in service_regen_conf
This commit is contained in:
parent
a06a753fb6
commit
9229210538
1 changed files with 11 additions and 2 deletions
|
@ -285,9 +285,18 @@ def service_regen_conf(names=[], with_diff=False, force=False,
|
||||||
"""
|
"""
|
||||||
result = {}
|
result = {}
|
||||||
|
|
||||||
# Just return pending conf
|
# Return the list of pending conf
|
||||||
if list_pending:
|
if list_pending:
|
||||||
return _get_pending_conf(names)
|
pending_conf = _get_pending_conf(names)
|
||||||
|
if with_diff:
|
||||||
|
for service, conf_files in pending_conf.items():
|
||||||
|
for system_path, pending_path in conf_files.items():
|
||||||
|
pending_conf[service][system_path] = {
|
||||||
|
'pending_conf': pending_path,
|
||||||
|
'diff': _get_files_diff(
|
||||||
|
system_path, pending_path, True),
|
||||||
|
}
|
||||||
|
return pending_conf
|
||||||
|
|
||||||
# Clean pending conf directory
|
# Clean pending conf directory
|
||||||
shutil.rmtree(pending_conf_dir, ignore_errors=True)
|
shutil.rmtree(pending_conf_dir, ignore_errors=True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue