Bug 1411045 - Fix error.get argument name. r?maja_zf draft
authorAndreas Tolfsen <ato@sny.no>
Mon, 23 Oct 2017 22:10:46 +0100
changeset 685978 f0b2cb27314d1b63d2868a88e8c462bc1f1195b1
parent 685977 c253ab4b82848dd37b95eca96775d029b95da033
child 685979 699e988013340943fd4526860ad77369c206a7aa
push id86054
push userbmo:ato@sny.no
push dateWed, 25 Oct 2017 07:41:54 +0000
reviewersmaja_zf
bugs1411045
milestone58.0a1
Bug 1411045 - Fix error.get argument name. r?maja_zf We talk about "error codes", not "status codes", for WebDriver errors. This is a non-functional change. MozReview-Commit-ID: Bl8zT8lZvzK
testing/web-platform/tests/tools/webdriver/webdriver/error.py
--- a/testing/web-platform/tests/tools/webdriver/webdriver/error.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/error.py
@@ -140,19 +140,20 @@ class UnknownMethodException(WebDriverEx
     status_code = "unknown method"
 
 
 class UnsupportedOperationException(WebDriverException):
     http_status = 500
     status_code = "unsupported operation"
 
 
-def get(status_code):
-    """Gets exception from `status_code`, falling back to
+def get(error_code):
+    """
+    Gets exception from `error_code`, falling back to
     ``WebDriverException`` if it is not found.
     """
-    return _errors.get(status_code, WebDriverException)
+    return _errors.get(error_code, WebDriverException)
 
 
 _errors = collections.defaultdict()
 for item in locals().values():
     if type(item) == type and issubclass(item, WebDriverException):
         _errors[item.status_code] = item