Fix used-before-assignment error

This commit is contained in:
Avram Lubkin 2023-01-05 09:47:58 -05:00 коммит произвёл Chi Song
Родитель 1e527d7966
Коммит 92afce2c26
1 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -40,21 +40,22 @@ class Dns(TestSuite):
priority=1,
)
def verify_dns_name_resolution_after_upgrade(self, node: Node) -> None:
is_passed_exception = False
self._check_dns_name_resolution(node)
try:
self._upgrade_system(node)
except ReleaseEndOfLifeException as identifier:
# If the release is end of life, skip the step of upgrading system.
# Continue the following test
node.log.debug(identifier)
is_passed_exception = True
exception_identifier = identifier
self._check_dns_name_resolution(node)
node.reboot()
self._check_dns_name_resolution(node)
if is_passed_exception:
raise PassedException(exception_identifier)
raise PassedException(identifier) from identifier
finally:
self._check_dns_name_resolution(node)
node.reboot()
self._check_dns_name_resolution(node)
@retry(tries=10, delay=0.5)
def _check_dns_name_resolution(self, node: Node) -> None: