Revert "Python SyntaxError: leading zeros in decimal integer literals (#4523)" (#4525)

This reverts commit fa0c1b4c6d.
This commit is contained in:
mbarbella-chromium 2020-10-12 08:52:37 -07:00 committed by GitHub
parent 2b2f5c504f
commit 0deeef6e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 13 deletions

View File

@ -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'))