| Index: native_client_sdk/src/build_tools/easy_template.py
|
| diff --git a/native_client_sdk/src/build_tools/easy_template.py b/native_client_sdk/src/build_tools/easy_template.py
|
| index 999bdb1f8816e9090aac4c62156da007e312d6d4..d6b904587c80a393a55fa8cde91a6dcf2a504a4d 100755
|
| --- a/native_client_sdk/src/build_tools/easy_template.py
|
| +++ b/native_client_sdk/src/build_tools/easy_template.py
|
| @@ -3,9 +3,9 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +import argparse
|
| import copy
|
| import cStringIO
|
| -import optparse
|
| import os
|
| import re
|
| import sys
|
| @@ -98,12 +98,11 @@ def RunTemplateString(src, template_dict, statement_re=None, expr_re=None):
|
|
|
|
|
| def main(args):
|
| - parser = optparse.OptionParser()
|
| - _, args = parser.parse_args(args)
|
| - if not args:
|
| - return
|
| + parser = argparse.ArgumentParser()
|
| + parser.add_argument('template')
|
| + options = parser.parse_args(args)
|
|
|
| - with open(args[0]) as f:
|
| + with open(options.template) as f:
|
| print TemplateToPython(
|
| f.read(), re.compile(STATEMENT_RE), re.compile(EXPR_RE))
|
|
|
|
|