kunit_tool: fix type error in exception rethrow
Fix an incorrect concatanation of a string with an exception when
rethrowing an OSError as a ConfigError.
Reported-by: Rebecca Chen <rechen@google.com>
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Change-Id: Ib8a76f5d59dabe318835386f5e90afb7acc55480
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index 1cbb2ee..76420d2 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -38,7 +38,7 @@
try:
subprocess.check_output(['make', 'mrproper'])
except OSError as e:
- raise ConfigError('Could not call make command: ' + e)
+ raise ConfigError('Could not call make command: ' + str(e))
except subprocess.CalledProcessError as e:
raise ConfigError(e.output)
@@ -46,7 +46,7 @@
try:
subprocess.check_output(['make', 'ARCH=um', 'olddefconfig'])
except OSError as e:
- raise ConfigError('Could not call make command: ' + e)
+ raise ConfigError('Could not call make command: ' + str(e))
except subprocess.CalledProcessError as e:
raise ConfigError(e.output)
@@ -54,7 +54,7 @@
try:
subprocess.check_output(['make', 'ARCH=um', '--jobs=' + str(jobs)])
except OSError as e:
- raise BuildError('Could not call execute make: ' + e)
+ raise BuildError('Could not call execute make: ' + str(e))
except subprocess.CalledProcessError as e:
raise BuildError(e.output)