aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra
diff options
context:
space:
mode:
authorGravatar mbarbella-chromium <41697236+mbarbella-chromium@users.noreply.github.com>2020-10-12 08:50:38 -0700
committerGravatar GitHub <noreply@github.com>2020-10-12 08:50:38 -0700
commit2b2f5c504f7057d16b0e69f6360eddea92cf0ad1 (patch)
treecce8f302b6d696b0cb0b853b98877efb352a04eb /infra
parent6fe03eafb557c631d598cf2391f737f34499cb8c (diff)
Revert "nettle.py: SyntaxError leading zeros in decimal integer literals (#4522)" (#4524)
Diffstat (limited to 'infra')
-rw-r--r--infra/base-images/base-sanitizer-libs-builder/packages/nettle.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/infra/base-images/base-sanitizer-libs-builder/packages/nettle.py b/infra/base-images/base-sanitizer-libs-builder/packages/nettle.py
index ed02bfd0..e1b0e2f8 100644
--- a/infra/base-images/base-sanitizer-libs-builder/packages/nettle.py
+++ b/infra/base-images/base-sanitizer-libs-builder/packages/nettle.py
@@ -14,31 +14,28 @@
# limitations under the License.
#
################################################################################
-"""
-nettle.py
-"""
+
import os
import shutil
import package
-def add_no_asm_arg(config_path):
+def AddNoAsmArg(config_path):
"""Add --disable-assembler 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 --disable-assembler "$@"\n' % config_path)
- os.chmod(config_path, 0o755)
+ with open(config_path, 'w') as f:
+ f.write(
+ '#!/bin/sh\n'
+ '%s.real --disable-assembler "$@"\n' % config_path)
+ os.chmod(config_path, 0755)
-class Package(package.Package): # pylint: disable=too-few-public-methods
+class Package(package.Package):
"""nettle package."""
def __init__(self, apt_version):
super(Package, self).__init__('nettle', 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'))
+ def PreBuild(self, source_directory, env, custom_bin_dir):
+ AddNoAsmArg(os.path.join(source_directory, 'configure'))