create_error_reports update for python3
Add the change as suggested by the '2to3' program, and also
explicitly specify python3.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I688b773869e09c57dae3a3719404c5224c581e85
diff --git a/create_error_reports.py b/create_error_reports.py
index 8471827..d8264e1 100755
--- a/create_error_reports.py
+++ b/create_error_reports.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''Generates 2 reports about OpenBMC error logs:
@@ -123,11 +123,9 @@
if not files:
continue
- err_files += map(
- lambda f: os.path.relpath(
- os.path.join(directory, f),
- yaml_dir),
- filter(lambda f: f.endswith('.errors.yaml'), files))
+ err_files += [os.path.relpath(
+ os.path.join(directory, f), yaml_dir)
+ for f in [f for f in files if f.endswith('.errors.yaml')]]
return err_files