diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-11-17 19:18:54 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-11-17 19:18:54 +0000 |
commit | 1a953372f7c1c5b8fbe0abb526b07987bd5adfe0 (patch) | |
tree | f3a853add556f4846d23a7b082fbea2f9b77726e | |
parent | 1cf5c435d93996ac2378c090f7632afc3100a21c (diff) | |
download | obnam-1a953372f7c1c5b8fbe0abb526b07987bd5adfe0.tar.gz |
Optimisation: don't retrieve generation list twice
-rw-r--r-- | obnamlib/plugins/fsck_plugin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/obnamlib/plugins/fsck_plugin.py b/obnamlib/plugins/fsck_plugin.py index b23f8bca..784a5406 100644 --- a/obnamlib/plugins/fsck_plugin.py +++ b/obnamlib/plugins/fsck_plugin.py @@ -195,9 +195,9 @@ class CheckClient(WorkItem): logging.debug('Checking client=%s' % self.client_name) if self.repo.current_client != self.client_name: self.repo.open_client(self.client_name) - yield CheckGenerationIdsAreDifferent(self.client_name, - self.repo.list_generations()) - for genid in self.repo.list_generations(): + genids = self.repo.list_generations() + yield CheckGenerationIdsAreDifferent(self.client_name, genids) + for genid in genids: yield CheckGeneration(self.client_name, genid) |