diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-10-10 16:05:49 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-10-10 16:05:49 +0300 |
commit | cd198b834f2002de65e89874aabe8c7c6942a0dc (patch) | |
tree | 79df0d17575b49e12ad2b2801522b92a2d52dbfa | |
parent | 4bdaecf153ae2b316904f1e5281fa8b873e305a4 (diff) | |
download | obnam-cd198b834f2002de65e89874aabe8c7c6942a0dc.tar.gz |
Make BackupPlugin.pretend be a real attribute
It turns out to be costly to call the method often in a big backup.
-rw-r--r-- | obnamlib/plugins/backup_plugin.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py index 3da18cc2..0b27d688 100644 --- a/obnamlib/plugins/backup_plugin.py +++ b/obnamlib/plugins/backup_plugin.py @@ -159,6 +159,7 @@ class BackupPlugin(obnamlib.ObnamPlugin): root_urls = self.app.settings['root'] + args self.check_for_required_settings(root_urls) + self.pretend = self.app.settings['pretend'] self.start_backup() try: @@ -317,10 +318,6 @@ class BackupPlugin(obnamlib.ObnamPlugin): return p.parse(value) @property - def pretend(self): - return self.app.settings['pretend'] - - @property def client_name(self): return self.app.settings['client-name'] |