[autotest] Improve error message when job failure reason is unicode

This should prevent confusing error messages such as

    Unhandled unicode: Unhandled TimeoutException:

BUG=None
TEST=Verified locally

Change-Id: I7dc3370f52c69cbd59572be8e82811eb12b1f0fe
Reviewed-on: https://chromium-review.googlesource.com/463907
Commit-Ready: Luis Hector Chavez <lhchavez@chromium.org>
Tested-by: Luis Hector Chavez <lhchavez@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Lloyd Pique <lpique@chromium.org>
diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index 33bf4b9..65fd76b 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -56,7 +56,7 @@
     def __init__(self, unhandled_exception):
         if isinstance(unhandled_exception, JobError):
             JobError.__init__(self, *unhandled_exception.args)
-        elif isinstance(unhandled_exception, str):
+        elif isinstance(unhandled_exception, basestring):
             JobError.__init__(self, unhandled_exception)
         else:
             msg = "Unhandled %s: %s"
@@ -105,7 +105,7 @@
     def __init__(self, unhandled_exception):
         if isinstance(unhandled_exception, TestError):
             TestError.__init__(self, *unhandled_exception.args)
-        elif isinstance(unhandled_exception, str):
+        elif isinstance(unhandled_exception, basestring):
             TestError.__init__(self, unhandled_exception)
         else:
             msg = "Unhandled %s: %s"
@@ -120,7 +120,7 @@
     def __init__(self, unhandled_exception):
         if isinstance(unhandled_exception, TestFail):
             TestFail.__init__(self, *unhandled_exception.args)
-        elif isinstance(unhandled_exception, str):
+        elif isinstance(unhandled_exception, basestring):
             TestFail.__init__(self, unhandled_exception)
         else:
             msg = "Unhandled %s: %s"