diff options
author | Frazer Clews <frazerleslieclews@gmail.com> | 2020-08-24 15:51:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-25 18:14:53 +0100 |
commit | abc6f864b9c6fa9a47a218a8250e79dcfa367d4d (patch) | |
tree | e4dfa762398e1b2a8ae019e0039417be3e85d99c /bitbake/lib/toaster | |
parent | ac3593f6ed8f2ffb0bb62df47220b598cc1781f6 (diff) | |
download | poky-abc6f864b9c6fa9a47a218a8250e79dcfa367d4d.tar.gz |
bitbake: lib: fix most undefined code picked up by pylint
Correctly import, and inherit functions, and variables.
Also fix some typos and remove some Python 2 code that isn't recognised.
(Bitbake rev: b0c807be5c2170c9481c1a04d4c11972135d7dc5)
Signed-off-by: Frazer Clews <frazerleslieclews@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r-- | bitbake/lib/toaster/tests/functional/functional_helpers.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/tests/functional/functional_helpers.py b/bitbake/lib/toaster/tests/functional/functional_helpers.py index 455c408e94..5c4ea71794 100644 --- a/bitbake/lib/toaster/tests/functional/functional_helpers.py +++ b/bitbake/lib/toaster/tests/functional/functional_helpers.py | |||
@@ -75,7 +75,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): | |||
75 | try: | 75 | try: |
76 | table_element = self.get_table_element(table_id) | 76 | table_element = self.get_table_element(table_id) |
77 | element = table_element.find_element_by_link_text(link_text) | 77 | element = table_element.find_element_by_link_text(link_text) |
78 | except NoSuchElementException as e: | 78 | except self.NoSuchElementException: |
79 | print('no element found') | 79 | print('no element found') |
80 | raise | 80 | raise |
81 | return element | 81 | return element |
@@ -86,7 +86,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): | |||
86 | element_xpath = "//*[@id='" + table_id + "']" | 86 | element_xpath = "//*[@id='" + table_id + "']" |
87 | try: | 87 | try: |
88 | element = self.driver.find_element_by_xpath(element_xpath) | 88 | element = self.driver.find_element_by_xpath(element_xpath) |
89 | except NoSuchElementException as e: | 89 | except self.NoSuchElementException: |
90 | raise | 90 | raise |
91 | return element | 91 | return element |
92 | row = coordinate[0] | 92 | row = coordinate[0] |
@@ -96,7 +96,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): | |||
96 | element_xpath = "//*[@id='" + table_id + "']/tbody/tr[" + str(row) + "]" | 96 | element_xpath = "//*[@id='" + table_id + "']/tbody/tr[" + str(row) + "]" |
97 | try: | 97 | try: |
98 | element = self.driver.find_element_by_xpath(element_xpath) | 98 | element = self.driver.find_element_by_xpath(element_xpath) |
99 | except NoSuchElementException as e: | 99 | except self.NoSuchElementException: |
100 | return False | 100 | return False |
101 | return element | 101 | return element |
102 | #now we are looking for an element with specified X and Y | 102 | #now we are looking for an element with specified X and Y |
@@ -105,6 +105,6 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): | |||
105 | element_xpath = "//*[@id='" + table_id + "']/tbody/tr[" + str(row) + "]/td[" + str(column) + "]" | 105 | element_xpath = "//*[@id='" + table_id + "']/tbody/tr[" + str(row) + "]/td[" + str(column) + "]" |
106 | try: | 106 | try: |
107 | element = self.driver.find_element_by_xpath(element_xpath) | 107 | element = self.driver.find_element_by_xpath(element_xpath) |
108 | except NoSuchElementException as e: | 108 | except self.NoSuchElementException: |
109 | return False | 109 | return False |
110 | return element | 110 | return element |