This assumes that it's not OK for the top level to disappear or become
unreadable. Once we add the changes that drop the need to chdir, this
will become irrelevant.
Signed-off-by: Rob Browning <
r...@defaultvalue.org>
Tested-by: Rob Browning <
r...@defaultvalue.org>
---
lib/bup/drecurse.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/bup/drecurse.py b/lib/bup/drecurse.py
index 4653ad73..9d790bbd 100644
--- a/lib/bup/drecurse.py
+++ b/lib/bup/drecurse.py
@@ -119,9 +119,5 @@ def recursive_dirlist(paths, xdev, bup_dir=None,
else:
prepend = path
yield (prepend,pst)
- except:
- try:
- os.fchdir(startdir)
- except:
- pass
- raise
+ finally:
+ os.fchdir(startdir)
--
2.47.3