diff options
author | Ricardo Martincoski <ricardo.martincoski@gmail.com> | 2017-10-05 18:42:09 -0300 |
---|---|---|
committer | Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> | 2017-10-06 18:56:49 +0200 |
commit | ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f (patch) | |
tree | f1187ecd2a501454fc53e9ae03b89e4480f1d40e /support/testing/infra/__init__.py | |
parent | 2927f412be6fd52961a2cd9aaed203d57609eef9 (diff) | |
download | buildroot-ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f.tar.gz buildroot-ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f.zip |
support/testing: fix code style
Fix the trivial warnings from flake8:
- remove modules imported but unused;
- use 2 lines before class or module level method;
- remove blank line at end of file.
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'support/testing/infra/__init__.py')
-rw-r--r-- | support/testing/infra/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/support/testing/infra/__init__.py b/support/testing/infra/__init__.py index 27e2a2708d..b03e891771 100644 --- a/support/testing/infra/__init__.py +++ b/support/testing/infra/__init__.py @@ -1,4 +1,3 @@ -import contextlib import os import re import sys @@ -8,6 +7,7 @@ from urllib2 import urlopen, HTTPError, URLError ARTIFACTS_URL = "http://autobuild.buildroot.net/artefacts/" + def open_log_file(builddir, stage, logtofile=True): """ Open a file for logging and return its handler. @@ -20,9 +20,11 @@ def open_log_file(builddir, stage, logtofile=True): fhandle = sys.stdout return fhandle + def filepath(relpath): return os.path.join(os.getcwd(), "support/testing", relpath) + def download(dldir, filename): finalpath = os.path.join(dldir, filename) if os.path.exists(finalpath): @@ -46,6 +48,7 @@ def download(dldir, filename): os.rename(tmpfile, finalpath) return finalpath + def get_elf_arch_tag(builddir, prefix, fpath, tag): """ Runs the cross readelf on 'fpath', then extracts the value of tag 'tag'. @@ -66,9 +69,11 @@ def get_elf_arch_tag(builddir, prefix, fpath, tag): return m.group(1) return None + def get_file_arch(builddir, prefix, fpath): return get_elf_arch_tag(builddir, prefix, fpath, "Tag_CPU_arch") + def get_elf_prog_interpreter(builddir, prefix, fpath): """ Runs the cross readelf on 'fpath' to extract the program interpreter |