Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d0ca5d6 authored by Kelvin Zhang's avatar Kelvin Zhang
Browse files

Fix some python2/3 migration issues

Exception objects don't necessarily have a .message member, use str()
instead.

Test: th
Change-Id: I57b68dff1ace4937d6ef3b7c564f031e219491b1
parent 37d49295
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -198,8 +198,9 @@ class ApexUtilsTest(test_utils.ReleaseToolsTestCase):

    # pass `false` as a sign_tool to see the invocation error
    with self.assertRaises(common.ExternalError) as cm:
        signer = apex_utils.ApexApkSigner(apex_path, None, None, sign_tool='false')
      signer = apex_utils.ApexApkSigner(
          apex_path, None, None, sign_tool='false')
      signer.ProcessApexFile(apk_keys, self.payload_key)

    the_exception = cm.exception
    self.assertIn('Failed to run command \'[\'false\'', the_exception.message)
    self.assertIn('Failed to run command \'[\'false\'', str(the_exception))