aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorVincenzo Maffione <v.maffione@gmail.com>2017-05-31 14:16:22 +0200
committerVincenzo Maffione <v.maffione@gmail.com>2017-05-31 14:16:22 +0200
commit2cf3cb3e9999a00ca21742f7a63c3cff15fce704 (patch)
tree5b3ed0e62da316687e2e19e0a1e1d6865dec07f6 /examples
parent2034e923f5745f4fda4fccd1af0a3e13db76ddf9 (diff)
downloadrumba-2cf3cb3e9999a00ca21742f7a63c3cff15fce704.tar.gz
rumba-2cf3cb3e9999a00ca21742f7a63c3cff15fce704.zip
examples: jfed-rlite: use try-finally
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/jfed-rlite.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/jfed-rlite.py b/examples/jfed-rlite.py
index ce058eb..d80b56e 100755
--- a/examples/jfed-rlite.py
+++ b/examples/jfed-rlite.py
@@ -46,6 +46,9 @@ tb = jfed.Testbed(exp_name = args.expname,
exp = rlite.Experiment(tb, nodes = [a, b])
-exp.swap_in()
-exp.install_prototype()
-exp.bootstrap_prototype()
+try:
+ exp.swap_in()
+ exp.install_prototype()
+ exp.bootstrap_prototype()
+finally:
+ exp.swap_out()