From 0deeef6e3141dddfe501efe9d863299d078a144b Mon Sep 17 00:00:00 2001 From: mbarbella-chromium <41697236+mbarbella-chromium@users.noreply.github.com> Date: Mon, 12 Oct 2020 08:52:37 -0700 Subject: [PATCH] Revert "Python SyntaxError: leading zeros in decimal integer literals (#4523)" (#4525) This reverts commit fa0c1b4c6d9f7d235ea297608e5cc434443aa7d8. --- .../packages/openssl.py | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/openssl.py b/infra/base-images/base-sanitizer-libs-builder/packages/openssl.py index 6dbe6170e..e24ccc588 100644 --- a/infra/base-images/base-sanitizer-libs-builder/packages/openssl.py +++ b/infra/base-images/base-sanitizer-libs-builder/packages/openssl.py @@ -14,31 +14,29 @@ # limitations under the License. # ################################################################################ -""" -openssl.py -""" + import os import shutil import package -def add_no_asm_arg(config_path): +def AddNoAsmArg(config_path): """Add --no-asm to config scripts.""" shutil.move(config_path, config_path + '.real') - with open(config_path, 'w') as out_file: - out_file.write('#!/bin/sh\n' '%s.real no-asm "$@"\n' % config_path) - os.chmod(config_path, 0o755) + with open(config_path, 'w') as f: + f.write( + '#!/bin/sh\n' + '%s.real no-asm "$@"\n' % config_path) + os.chmod(config_path, 0755) -class Package(package.Package): # pylint: disable=too-few-public-methods +class Package(package.Package): """openssl package.""" def __init__(self, apt_version): super(Package, self).__init__('openssl', apt_version) - # pylint: disable=no-self-use,unused-argument - def pre_build(self, source_directory, env, custom_bin_dir): - """ pre_build() """ - add_no_asm_arg(os.path.join(source_directory, 'Configure')) - add_no_asm_arg(os.path.join(source_directory, 'config')) + def PreBuild(self, source_directory, env, custom_bin_dir): + AddNoAsmArg(os.path.join(source_directory, 'Configure')) + AddNoAsmArg(os.path.join(source_directory, 'config'))