summaryrefslogtreecommitdiff
path: root/utils/check_cfc/obj_diff.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
commit676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch)
tree02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /utils/check_cfc/obj_diff.py
parentc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff)
Diffstat (limited to 'utils/check_cfc/obj_diff.py')
-rwxr-xr-xutils/check_cfc/obj_diff.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/check_cfc/obj_diff.py b/utils/check_cfc/obj_diff.py
index cc4c2a97d5e5b..a0951c5bcdee4 100755
--- a/utils/check_cfc/obj_diff.py
+++ b/utils/check_cfc/obj_diff.py
@@ -1,6 +1,6 @@
-#!/usr/bin/env python2.7
+#!/usr/bin/env python
-from __future__ import print_function
+from __future__ import absolute_import, division, print_function
import argparse
import difflib
@@ -25,7 +25,7 @@ def disassemble(objfile):
if p.returncode or err:
print("Disassemble failed: {}".format(objfile))
sys.exit(1)
- return filter(keep_line, out.split(os.linesep))
+ return [line for line in out.split(os.linesep) if keep_line(line)]
def dump_debug(objfile):
"""Dump all of the debug info from a file."""
@@ -34,7 +34,7 @@ def dump_debug(objfile):
if p.returncode or err:
print("Dump debug failed: {}".format(objfile))
sys.exit(1)
- return filter(keep_line, out.split(os.linesep))
+ return [line for line in out.split(os.linesep) if keep_line(line)]
def first_diff(a, b, fromfile, tofile):
"""Returns the first few lines of a difference, if there is one. Python