提交 099ca9c3 编写于 作者: P Praveen K Pandey

Fixed issue in avocado:utils:distro

In SUSE distro distro.detect() is failing as undefined variable

log:
START 1-generic/sosreport.py:sosreport_test.test;run-cd82
Test metadata:
  filename: /root/avocado-fvt-wrapper/tests/avocado-misc-tests/generic/sosreport.py
DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)

Reproduced traceback from: /usr/lib/python2.7/site-packages/avocado_framework-58.0-py2.7.egg/avocado/core/test.py:814
Traceback (most recent call last):
  File "/root/avocado-fvt-wrapper/tests/avocado-misc-tests/generic/sosreport.py", line 42, in setUp
    dist = distro.detect()
  File "/usr/lib/python2.7/site-packages/avocado_framework-58.0-py2.7.egg/avocado/utils/distro.py", line 416, in detect
    distro_result = probe_instance.get_distro()
  File "/usr/lib/python2.7/site-packages/avocado_framework-58.0-py2.7.egg/avocado/utils/distro.py", line 370, in get_distro
    with open(self.check_file) as check_file:
AttributeError: 'SUSEProbe' object has no attribute 'check_file'
Signed-off-by: NPraveen K Pandey <praveen@linux.vnet.ibm.com>
上级 65e7f84e
......@@ -367,7 +367,7 @@ class SUSEProbe(Probe):
version_id_re = re.compile(r'VERSION_ID="([\d\.]*)"')
version_id = None
with open(self.check_file) as check_file:
with open(self.CHECK_FILE) as check_file:
for line in check_file:
match = version_id_re.match(line)
if match:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册