aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-21 02:12:10 +0000
committerlloyd <[email protected]>2015-01-21 02:12:10 +0000
commit1f59fa09984cb364c1dc560043ffa735e1f23494 (patch)
treebf72cfc564dbca5194cfcf9957dda5900b52a601
parent747b8127649791bfd1dcae10b55c8a194b43d2b0 (diff)
Save to file by default
-rwxr-xr-xsrc/scripts/tls_suite_info.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/scripts/tls_suite_info.py b/src/scripts/tls_suite_info.py
index 5f06f503f..4fb3c430a 100755
--- a/src/scripts/tls_suite_info.py
+++ b/src/scripts/tls_suite_info.py
@@ -173,7 +173,8 @@ def process_command_line(args):
help='save downloaded tls-parameters.txt')
parser.add_option('--output', '-o',
- help='save output to named file instead of stdout')
+ help='file to write output to (default %default)',
+ default='src/lib/tls/tls_suite_info.cpp')
return parser.parse_args(args)
@@ -275,7 +276,7 @@ def main(args = None):
* (tls-parameters.txt hash %s)
* by %s on %s
*
-* Released under the terms of the Botan license
+* Botan is released under the Simplified BSD License (see license.txt)
*/
""" % (contents_hash, sys.argv[0], datetime.date.today().strftime("%Y-%m-%d"))
@@ -308,12 +309,12 @@ Ciphersuite Ciphersuite::by_id(u16bit suite)
}
"""
- if options.output != None:
+ if options.output == '-':
+ print suite_info,
+ else:
out = open(options.output, 'w')
out.write(suite_info)
out.close()
- else:
- print suite_info,
if __name__ == '__main__':
sys.exit(main())