Current master (commit c8ffbeacbe3be3428e4f68f15545ea8abe689994)
The main cli entrypoint (Cli) delegates the heavy lifting to BackupProcessor.process_backups. However, this method does not return the result of performing the backups, but instead prints them (stdout). This makes it inconvenient to use BackupProcessor from external code (as a library):
It would probably be better for BackupProcessor.process_backups to return the json (that it already produces) instead, and let the caller decide what it wants to do with it. This way Cli.run can just print it, but library users can handle it differently.
Current master (commit c8ffbeacbe3be3428e4f68f15545ea8abe689994)
The main cli entrypoint (Cli) delegates the heavy lifting to
BackupProcessor.process_backups
. However, this method does not return the result of performing the backups, but instead prints them (stdout). This makes it inconvenient to use BackupProcessor from external code (as a library):https://git.launchpad.net/juju-backup-all/tree/jujubackupall/process.py?id=c8ffbeacbe3be3428e4f68f15545ea8abe689994#n104
It would probably be better for
BackupProcessor.process_backups
to return the json (that it already produces) instead, and let the caller decide what it wants to do with it. This way Cli.run can just print it, but library users can handle it differently.Imported from Launchpad using lp2gh.
date created: 2021-11-23T06:17:12Z
owner: jfguedez
assignee: jfguedez
the launchpad url