ganeshmurthy commented on a change in pull request #1212:
URL: https://github.com/apache/qpid-dispatch/pull/1212#discussion_r630525577
##########
File path: tests/system_tests_bad_configuration.py
##########
@@ -109,15 +109,23 @@ def wait_for_unresolvable_host(self):
then it stops scheduling new attempts.
:return:
"""
- with open(self.router.logfile_path, 'r') as router_log:
- log_lines = router_log.read().split("\n")
- expected_log_snip = "Connection to %s" %
self.unresolvable_host_name
- errors_caught = [line for line in log_lines if expected_log_snip
in line and "failed" in line]
-
- self.error_caught = any(errors_caught)
-
- # If condition not yet satisfied and not exhausted max attempts,
- # re-schedule the verification.
+ try:
+ with open(self.router.logfile_path, 'r') as router_log:
Review comment:
It says here that 't' is default -
https://docs.python.org/3/library/functions.html#open
It also says that 'r' is default, so no need to specify any more in this
case, it looks like
"mode is an optional string that specifies the mode in which the file is
opened. It defaults to 'r' which means open for reading in text mode."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]