From 51a175634d24eec42ad5a7cbe23660b42a63470c Mon Sep 17 00:00:00 2001 From: Joel Andres Granados Date: Thu, 7 Aug 2008 19:02:36 +0200 Subject: 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. --- pyfirstaidkit/interpret.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pyfirstaidkit/interpret.py') 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 -- cgit