diff options
author | Tony Garnock-Jones <tonyg@lshift.net> | 2009-05-13 13:46:25 +0100 |
---|---|---|
committer | Tony Garnock-Jones <tonyg@lshift.net> | 2009-05-13 13:46:25 +0100 |
commit | 6822f8e3072d91b6540f113b49e56482b613b438 (patch) | |
tree | 27ae4a132999c0920d1f2faca9792ef6010d35b2 | |
parent | e7c3c8856ce4db3b09e15a7f31871051400c5e7b (diff) | |
parent | 5a6bd1bbf17d9d53f566b3a2837423126b641da5 (diff) | |
download | rabbitmq-codegen-git-6822f8e3072d91b6540f113b49e56482b613b438.tar.gz |
merge bug20678 into v1_5rabbitmq_v1_5_5
-rw-r--r-- | amqp_codegen.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/amqp_codegen.py b/amqp_codegen.py index ff00c8b5..06c772a6 100644 --- a/amqp_codegen.py +++ b/amqp_codegen.py @@ -179,11 +179,12 @@ def do_main(header_fn,body_fn): stdout = sys.stdout f = open(out_file, 'w') try: - sys.stdout = f - fn(amqp_spec) - except: - remove(out_file) - raise + try: + sys.stdout = f + fn(amqp_spec) + except: + remove(out_file) + raise finally: sys.stdout = stdout f.close() |