summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-08-08 13:51:51 +0200
committerMartin Sivak <msivak@redhat.com>2008-08-08 13:51:51 +0200
commitb80d10f56d44a3c9887c8ab3fe4af4220cc049c6 (patch)
tree4c99031423d747644f897b758547eb79ae1c4ca0
parent8c67cb05de5a58554fe9f4decd0edf825f3fb0a3 (diff)
downloadfirstaidkit-b80d10f56d44a3c9887c8ab3fe4af4220cc049c6.tar.gz
firstaidkit-b80d10f56d44a3c9887c8ab3fe4af4220cc049c6.tar.xz
firstaidkit-b80d10f56d44a3c9887c8ab3fe4af4220cc049c6.zip
Print the persistent backup space path at the end
-rw-r--r--plugins/plugin_examples/sample1Plugin.py2
-rw-r--r--pyfirstaidkit/utils/backup.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/plugin_examples/sample1Plugin.py b/plugins/plugin_examples/sample1Plugin.py
index 69107c4..8479ddc 100644
--- a/plugins/plugin_examples/sample1Plugin.py
+++ b/plugins/plugin_examples/sample1Plugin.py
@@ -32,6 +32,7 @@ class Sample1Plugin(Plugin):
def prepare(self):
self._result=ReturnSuccess
self._issue.set(reporting = self._reporting, origin = self, level = PLUGIN)
+ self.backup = self._backups.getBackup(self.__class__.__name__+" -- "+self.name, persistent = True)
self._reporting.info("Sample1Plugin in Prepare task", origin = self, level = PLUGIN)
def backup(self):
@@ -54,6 +55,7 @@ class Sample1Plugin(Plugin):
def clean(self):
self._result=ReturnSuccess
+ self._backups.closeBackup(self.backup._id)
self._reporting.info("Sample1Plugin in Clean task", origin = self, level = PLUGIN)
def get_plugin():
diff --git a/pyfirstaidkit/utils/backup.py b/pyfirstaidkit/utils/backup.py
index c543c1b..f8db54a 100644
--- a/pyfirstaidkit/utils/backup.py
+++ b/pyfirstaidkit/utils/backup.py
@@ -290,7 +290,7 @@ class FileBackupStore(BackupStoreInterface):
if backupEmpty:
os.rmdir(self._path)
else:
- print("I'm keeping persistent backup spaces intact")
+ print("I'm keeping persistent backup spaces intact in %s" % (self._path,))
print("Backup closed")