commit | 05fde26bf1dd8f1be10a005bf96a23dd27f4b367 | [log] [tgz] |
---|---|---|
author | Rich Lane <rlane@bigswitch.com> | Sun Nov 10 17:35:15 2013 -0800 |
committer | Rich Lane <rlane@bigswitch.com> | Sun Nov 10 17:35:15 2013 -0800 |
tree | 17d0a1864cc4c0b138f283ac67d45a67614485a3 | |
parent | 0bc84ff25d5f28dc1ef3ade6c66be82ae24f227c [diff] |
wireshark: simplify backend init
diff --git a/wireshark_gen/__init__.py b/wireshark_gen/__init__.py index c4ff7f4..1225131 100644 --- a/wireshark_gen/__init__.py +++ b/wireshark_gen/__init__.py
@@ -111,8 +111,10 @@ return r -def generate(out, name): +def generate(): context = { 'fields': create_fields(), } - utils.render_template(out, "openflow.lua", [templates_dir], context) + + with utils.open_output('openflow.lua') as out: + utils.render_template(out, "openflow.lua", [templates_dir], context)