diff --git a/avocado/utils/gdb.py b/avocado/utils/gdb.py index 09b4b142740b2b59c8734b9d024f6e0e143899b6..52d30d3c4ce4387ca8fdd25b421002abbf24a63a 100644 --- a/avocado/utils/gdb.py +++ b/avocado/utils/gdb.py @@ -427,7 +427,7 @@ class GDB(object): self.send_gdb_command(command) responses = self.read_until_break() - result_response = None + result_response_received = False for line in responses: # If the line can not be properly parsed, it is *most likely* @@ -442,10 +442,11 @@ class GDB(object): parsed_response.record_type == 'stream'): cmd.stream_messages.append(parsed_response) elif parsed_response.type == 'result': - if result_response is not None: + if result_response_received: # raise an exception here, because no two result # responses should come from a single command AFAIK raise Exception("Many result responses to a single cmd") + result_response_received = True cmd.result = parsed_response else: self.async_messages.append(parsed_response) diff --git a/avocado/utils/iso9660.py b/avocado/utils/iso9660.py index 2bbf55ee720ce6563006dd5a094a979f67c2c90b..382e0500c2da4d0afeccafb14cbb28745ce55656 100644 --- a/avocado/utils/iso9660.py +++ b/avocado/utils/iso9660.py @@ -34,7 +34,6 @@ import sys import tempfile from . import process -from . import path as utils_path try: @@ -130,7 +129,6 @@ class BaseIso9660(object): """ def __init__(self, path): - utils_path.check_readable(path) self.path = path def read(self, path): @@ -382,7 +380,7 @@ class ISO9660PyCDLib(MixInMntDirMount, BaseIso9660): def __init__(self, path): if not has_pycdlib(): raise RuntimeError('This class requires the pycdlib library') - self.path = path + super(ISO9660PyCDLib, self).__init__(path) self._iso = None self._iso_opened_for_create = False diff --git a/avocado/utils/process.py b/avocado/utils/process.py index 049efa1310aba9b2508f8d38200b557ad316195a..20d54f41054da403c74a436bb7715067743cc925 100644 --- a/avocado/utils/process.py +++ b/avocado/utils/process.py @@ -1149,11 +1149,10 @@ class GDBSubProcess(object): elif gdb.is_break_hit(parsed_msg): # waits on fifo read() until end of debug session is notified - r = self.handle_break_hit(parsed_msg) - if r == 'C': + if self.handle_break_hit(parsed_msg) == 'C': self.gdb.connect(self.gdb_server.port) if self._is_thread_stopped(): - r = self.gdb.cli_cmd("continue") + self.gdb.cli_cmd("continue") else: log.warn('Binary "%s" terminated inside the ' 'debugger before avocado was resumed. ' @@ -1169,7 +1168,7 @@ class GDBSubProcess(object): elif gdb.is_fatal_signal(parsed_msg): # waits on fifo read() until end of debug session is notified - r = self.handle_fatal_signal(parsed_msg) + self.handle_fatal_signal(parsed_msg) log.warn('Because "%s" received a fatal signal, this test ' 'is going to be skipped.', self.binary) # pylint: disable=E0702