OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2016 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2016 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # TODO(svaldez): Deduplicate various annotate_test_data. | 5 # TODO(svaldez): Deduplicate various annotate_test_data. |
6 | 6 |
7 """This script is called without any arguments to re-format all of the *.pem | 7 """This script is called without any arguments to re-format all of the *.pem |
8 files in the script's parent directory. | 8 files in the script's parent directory. |
9 | 9 |
10 The main formatting change is to run "openssl asn1parse" for each of the PEM | 10 The main formatting change is to run "openssl asn1parse" for each of the PEM |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 print "Processing %s ..." % (path) | 164 print "Processing %s ..." % (path) |
165 original_data = ReadFileToString(path) | 165 original_data = ReadFileToString(path) |
166 transformed_data = Transform(original_data) | 166 transformed_data = Transform(original_data) |
167 if original_data != transformed_data: | 167 if original_data != transformed_data: |
168 WriteStringToFile(transformed_data, path) | 168 WriteStringToFile(transformed_data, path) |
169 print "Rewrote %s" % (path) | 169 print "Rewrote %s" % (path) |
170 | 170 |
171 | 171 |
172 if __name__ == "__main__": | 172 if __name__ == "__main__": |
173 main() | 173 main() |
OLD | NEW |