Bug 1410799 - Fix NameError for cls_name r=jgraham
MozReview-Commit-ID: 7xf1Xu0BA5u
--- a/testing/web-platform/tests/tools/webdriver/webdriver/transport.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/transport.py
@@ -14,16 +14,17 @@ class Response(object):
body has been read and parsed as appropriate.
"""
def __init__(self, status, body):
self.status = status
self.body = body
def __repr__(self):
+ cls_name = self.__class__.__name__
if self.error:
return "<%s status=%s error=%s>" % (cls_name, self.status, repr(self.error))
return "<% status=%s body=%s>" % (cls_name, self.status, json.dumps(self.body))
def __str__(self):
return json.dumps(self.body, indent=2)
@property