summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit/interpret.py
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-08-07 19:02:36 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-08-07 19:06:31 +0200
commit51a175634d24eec42ad5a7cbe23660b42a63470c (patch)
tree49d6c1c1d8d3ed7bc562cff8ab98eb1b86774eaa /pyfirstaidkit/interpret.py
parentd26d9504b6eced4cebe9c81f304858a45725a1ee (diff)
downloadfirstaidkit-51a175634d24eec42ad5a7cbe23660b42a63470c.tar.gz
firstaidkit-51a175634d24eec42ad5a7cbe23660b42a63470c.tar.xz
firstaidkit-51a175634d24eec42ad5a7cbe23660b42a63470c.zip
Create a new backup directory every time, unless the user tells us otherwise.
Use tempfile to create safe backup directories. User should define backup.fullpath if he wants to override the default behaviour. User can also choose the directory where the backup directory goes.
Diffstat (limited to 'pyfirstaidkit/interpret.py')
-rw-r--r--pyfirstaidkit/interpret.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyfirstaidkit/interpret.py b/pyfirstaidkit/interpret.py
index 71c1152..8817b04 100644
--- a/pyfirstaidkit/interpret.py
+++ b/pyfirstaidkit/interpret.py
@@ -49,7 +49,9 @@ class Tasker:
self._reporting = reporting
if backups is None:
- self._backups = FileBackupStore(cfg.backup.path)
+ self._backups = FileBackupStore(rootpath = cfg.backup.rootpath,
+ fullpath = cfg.backup.fullpath)
+ cfg.backup.fullpath = self._backups._path
else:
self._backups = backups