move away from Exception.message

Python 2.6 deprecated the Exception.message field and Python 3 has
dropped it entirely.  Using str() on the exception should get us
all the same info, so switch to that (or implicitly so when using
%s with formatting output).

TEST=`cros lint` is clean w/pylint-1.7 again

Change-Id: I5c4324ff0f2a81485e7a9091a50bf0c56a73c4f7
Tested-by: Mike Frysinger <>
Commit-Ready: Mike Frysinger <>
Legacy-Commit-Queue: Commit Bot <>
Reviewed-by: Will Bradley <>
diff --git a/ b/
index 9a19ac7..9a13272 100755
--- a/
+++ b/
@@ -991,7 +991,7 @@
       license_types = licenses_lib.GetLicenseTypesFromEbuild(ebuild_content,
     except ValueError as e:
-      return HookFailure(e.message, [ebuild])
+      return HookFailure(str(e), [ebuild])
     # Also ignore licenses ending with '?'
     for license_type in [x for x in license_types
@@ -1000,7 +1000,7 @@
       except AssertionError as e:
-        return HookFailure(e.message, [ebuild])
+        return HookFailure(str(e), [ebuild])
 def _check_ebuild_virtual_pv(project, commit):