[py] Fixing stacktrace parser to handle strings as well as objects
@@ -213,7 +213,8 @@ class ErrorHandler(object):
st_value = value.get('stackTrace') or value.get('stacktrace')
if st_value:
if isinstance(st_value, basestring):
- st_value = st_value.split('\n')
+ stacktrace = st_value.split('\n')
+ else:
stacktrace = []
try:
for frame in st_value:
@@ -226,8 +227,7 @@ class ErrorHandler(object):
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
- #stacktrace.append(msg)
- stacktrace.append(frame)
+ stacktrace.append(msg)
except TypeError:
pass
if exception_class == UnexpectedAlertPresentException:
