diff --git a/tmt/base.py b/tmt/base.py index 46e32448e7..3486af399d 100644 --- a/tmt/base.py +++ b/tmt/base.py @@ -89,7 +89,7 @@ def fmf_id(self): def run(command): """ Run command, return output """ - result = subprocess.run(command.split(), capture_output=True) + result = subprocess.run(command.split(), stdout=subprocess.PIPE) return result.stdout.strip().decode("utf-8") fmf_id = {'name': self.name} diff --git a/tmt/export.py b/tmt/export.py index 878f9ff6d0..49a6c9dea1 100644 --- a/tmt/export.py +++ b/tmt/export.py @@ -165,9 +165,9 @@ def export_to_nitrate(test, create, general): echo(style(section + ': ', fg='green') + attribute.strip()) # fmf identifer - fmf_id = test.fmf_id - struct_field.set('fmf', yaml.dump(fmf_id)) - echo(style('fmf id:\n', fg='green') + yaml.dump(fmf_id).strip()) + fmf_id = tmt.utils.dict_to_yaml(test.fmf_id) + struct_field.set('fmf', fmf_id) + echo(style('fmf id:\n', fg='green') + fmf_id.strip()) # Warning if WARNING not in struct_field.header():