summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-08-24 17:24:17 +0100
committerLars Wirzenius <liw@liw.fi>2011-08-24 17:24:17 +0100
commitdf830e81db2e5f9084edb384f84bbb98664a7591 (patch)
tree35a3ebaa281e2d10e01bd58698effbef926e25a4
parentc7d59ec44617941534ad62d48c744e22d3f2bb38 (diff)
downloadobnam-df830e81db2e5f9084edb384f84bbb98664a7591.tar.gz
Don't catch GeneratorExit in a generator.
-rw-r--r--obnamlib/plugins/backup_plugin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py
index 79a174d7..a69aabba 100644
--- a/obnamlib/plugins/backup_plugin.py
+++ b/obnamlib/plugins/backup_plugin.py
@@ -148,7 +148,7 @@ class BackupPlugin(obnamlib.ObnamPlugin):
logging.info('Making checkpoint')
self.backup_parents('.')
self.repo.commit_client(checkpoint=True)
- self.repo.lock_client(client_name)
+ self.repo.lock_client(self.app.settings['client-name'])
self.repo.start_generation()
last_checkpoint = self.repo.fs.bytes_written
self.app.dump_memory_profile('at end of checkpoint')
@@ -174,6 +174,8 @@ class BackupPlugin(obnamlib.ObnamPlugin):
self.app.hooks.call('progress-found-file', pathname, metadata)
if self.needs_backup(pathname, metadata):
yield pathname, metadata
+ except GeneratorExit:
+ raise
except BaseException, e:
msg = 'Cannot back up %s: %s' % (pathname, str(e))
logging.error(msg)