From e3db3b560178292a08797dc55a28faf119dc2c17 Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Fri, 24 Jan 2020 13:24:57 +0300 Subject: [PATCH] fix abf create from src.rpm --- abf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/abf.py b/abf.py index 5c98d1c..d276615 100755 --- a/abf.py +++ b/abf.py @@ -1070,9 +1070,9 @@ def create(): print(_("Incorrect owner data")) return 1 - name = Popen('rpm -qp --qf="%{NAME}" ' + command_line.srpm, stdout=PIPE, shell=True).stdout.read() - if name > '': - description = Popen('rpm -qp --qf="%{SUMMARY}" ' + command_line.srpm, stdout=PIPE, shell=True).stdout.read() + name = Popen('rpm -qp --qf="%{NAME}" ' + command_line.srpm, stdout=PIPE, shell=True).stdout.read().decode() + if len(name) > 0: + description = Popen('rpm -qp --qf="%{SUMMARY}" ' + command_line.srpm, stdout=PIPE, shell=True).stdout.read().decode() ProjectCreator.new_project(models, name, description, owner_id, owner_type) # Save cwd, create temp folder and go to it