未验证 提交 d54478de 编写于 作者: C Cleber Rosa

Merge remote-tracking branch 'clebergnu/lgtm_alerts'

Signed-off-by: NCleber Rosa <crosa@redhat.com>
...@@ -427,7 +427,7 @@ class GDB(object): ...@@ -427,7 +427,7 @@ class GDB(object):
self.send_gdb_command(command) self.send_gdb_command(command)
responses = self.read_until_break() responses = self.read_until_break()
result_response = None result_response_received = False
for line in responses: for line in responses:
# If the line can not be properly parsed, it is *most likely* # If the line can not be properly parsed, it is *most likely*
...@@ -442,10 +442,11 @@ class GDB(object): ...@@ -442,10 +442,11 @@ class GDB(object):
parsed_response.record_type == 'stream'): parsed_response.record_type == 'stream'):
cmd.stream_messages.append(parsed_response) cmd.stream_messages.append(parsed_response)
elif parsed_response.type == 'result': elif parsed_response.type == 'result':
if result_response is not None: if result_response_received:
# raise an exception here, because no two result # raise an exception here, because no two result
# responses should come from a single command AFAIK # responses should come from a single command AFAIK
raise Exception("Many result responses to a single cmd") raise Exception("Many result responses to a single cmd")
result_response_received = True
cmd.result = parsed_response cmd.result = parsed_response
else: else:
self.async_messages.append(parsed_response) self.async_messages.append(parsed_response)
......
...@@ -34,7 +34,6 @@ import sys ...@@ -34,7 +34,6 @@ import sys
import tempfile import tempfile
from . import process from . import process
from . import path as utils_path
try: try:
...@@ -130,7 +129,6 @@ class BaseIso9660(object): ...@@ -130,7 +129,6 @@ class BaseIso9660(object):
""" """
def __init__(self, path): def __init__(self, path):
utils_path.check_readable(path)
self.path = path self.path = path
def read(self, path): def read(self, path):
...@@ -382,7 +380,7 @@ class ISO9660PyCDLib(MixInMntDirMount, BaseIso9660): ...@@ -382,7 +380,7 @@ class ISO9660PyCDLib(MixInMntDirMount, BaseIso9660):
def __init__(self, path): def __init__(self, path):
if not has_pycdlib(): if not has_pycdlib():
raise RuntimeError('This class requires the pycdlib library') raise RuntimeError('This class requires the pycdlib library')
self.path = path super(ISO9660PyCDLib, self).__init__(path)
self._iso = None self._iso = None
self._iso_opened_for_create = False self._iso_opened_for_create = False
......
...@@ -1149,11 +1149,10 @@ class GDBSubProcess(object): ...@@ -1149,11 +1149,10 @@ class GDBSubProcess(object):
elif gdb.is_break_hit(parsed_msg): elif gdb.is_break_hit(parsed_msg):
# waits on fifo read() until end of debug session is notified # waits on fifo read() until end of debug session is notified
r = self.handle_break_hit(parsed_msg) if self.handle_break_hit(parsed_msg) == 'C':
if r == 'C':
self.gdb.connect(self.gdb_server.port) self.gdb.connect(self.gdb_server.port)
if self._is_thread_stopped(): if self._is_thread_stopped():
r = self.gdb.cli_cmd("continue") self.gdb.cli_cmd("continue")
else: else:
log.warn('Binary "%s" terminated inside the ' log.warn('Binary "%s" terminated inside the '
'debugger before avocado was resumed. ' 'debugger before avocado was resumed. '
...@@ -1169,7 +1168,7 @@ class GDBSubProcess(object): ...@@ -1169,7 +1168,7 @@ class GDBSubProcess(object):
elif gdb.is_fatal_signal(parsed_msg): elif gdb.is_fatal_signal(parsed_msg):
# waits on fifo read() until end of debug session is notified # 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 ' log.warn('Because "%s" received a fatal signal, this test '
'is going to be skipped.', self.binary) 'is going to be skipped.', self.binary)
# pylint: disable=E0702 # pylint: disable=E0702
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册