diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-08-15 18:51:55 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-08-15 18:51:55 +0100 |
commit | 486c86999b8fda82bbc432bcfffd1bd098995b40 (patch) | |
tree | 68e290bff45af8c891e3eeeab4fac3fa3406dc18 | |
parent | ddd5d8c11f0732ff65af60d0a409ed1df0a6c949 (diff) | |
download | obnam-486c86999b8fda82bbc432bcfffd1bd098995b40.tar.gz |
Fix list-toplevels to not mind extra files at repo root
Patch by Lars Kruse.
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | obnamlib/plugins/encryption_plugin.py | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -22,6 +22,10 @@ Bug fixes: looks for client directories but fails to find them. Fix by Lars Kruse. +* "obnam list-toplevels" got confused when the repository contained + extra files, such as "lock" (left there by a previous, crashed Obnam + run). It no longer does. Fix by Lars Kruse. + Version 1.5, released 2013-08-08 -------------------------------- diff --git a/obnamlib/plugins/encryption_plugin.py b/obnamlib/plugins/encryption_plugin.py index bbca00c5..8d4662f9 100644 --- a/obnamlib/plugins/encryption_plugin.py +++ b/obnamlib/plugins/encryption_plugin.py @@ -196,6 +196,9 @@ class EncryptionPlugin(obnamlib.ObnamPlugin): keys = dict() tops = dict() for toplevel in [d for d in toplevels if d != 'metadata']: + # skip files (e.g. 'lock') or empty directories + if not repo.fs.exists(os.path.join(toplevel, 'key')): + continue try: userkeys = self.read_keyring(repo, toplevel) except obnamlib.EncryptionError: |