From 166aaedb9fc92590f5e9364c1cb6f607eaf28876 Mon Sep 17 00:00:00 2001 From: Ondrej Nosek Date: Sep 06 2021 16:18:17 +0000 Subject: Print SpecFile parsing debug info The recently added class SpecFile parses a specfile with tool rpmspec. It provides error messages when parsing failed. This change will show these messages to user. Without this rhpkg only fails with exception and simple message. Resolves: rhbz#2000556 Signed-off-by: Ondrej Nosek --- diff --git a/pyrpkg/spec.py b/pyrpkg/spec.py index 6341fcd..a276120 100644 --- a/pyrpkg/spec.py +++ b/pyrpkg/spec.py @@ -49,6 +49,7 @@ def run(spec, sourcedir): retcode = process.poll() if retcode: + print(stderr.decode('utf-8')) raise rpkgError('Error running rpmspec on "%s", return code %s' % (spec, retcode))