aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-01-12 16:50:37 +0100
committerGuido Günther <agx@sigxcpu.org>2017-01-12 16:50:37 +0100
commit8bd74df7ecce3dd5a13503acd91498c4d0fdb2f5 (patch)
treebe92ea5cfb2368815fc6270776802a278a5fec79
parentba09a0a1fb93eda94f6e3d2f2d3ff48bb56bc242 (diff)
command_wrappers: Simplify RunAtCommand
-rw-r--r--gbp/command_wrappers.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
index aec3018..bf26bff 100644
--- a/gbp/command_wrappers.py
+++ b/gbp/command_wrappers.py
@@ -237,10 +237,8 @@ class RunAtCommand(Command):
try:
os.chdir(dir)
Command.__call__(self, list(*args))
+ finally:
os.chdir(curdir)
- except Exception:
- os.chdir(curdir)
- raise
class UnpackTarArchive(Command):