From b93adbd9c1ccaf3aa28ba81ec09c7975a4a6f96f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 5 Mar 2022 15:58:20 +0100 Subject: [PATCH] pkglistgen: Fix exit values - True is actually bad --- pkglistgen/cli.py | 5 +---- pkglistgen/tool.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkglistgen/cli.py b/pkglistgen/cli.py index 70752fe5..fda68f90 100755 --- a/pkglistgen/cli.py +++ b/pkglistgen/cli.py @@ -56,7 +56,6 @@ class CommandLineInterface(ToolBase.CommandLineInterface): ${cmd_option_list} """ - print(opts.scope) if opts.staging: match = re.match('(.*):Staging:(.*)', opts.staging) opts.scope = 'staging:' + match.group(2) @@ -87,8 +86,6 @@ class CommandLineInterface(ToolBase.CommandLineInterface): if apiurl.find('opensuse.org') > 0: os.environ['OBS_NAME'] = 'build.opensuse.org' - self.error_occured = False - def solve_project(project, scope): try: self.tool.reset() @@ -100,7 +97,7 @@ class CommandLineInterface(ToolBase.CommandLineInterface): stop_after_solve=opts.stop_after_solve) except MismatchedRepoException: logging.error("Failed to create weakremovers.inc due to mismatch in repos - project most likey started building again.") - return True + return 0 scope = opts.scope if scope.startswith('staging:'): diff --git a/pkglistgen/tool.py b/pkglistgen/tool.py index e911362d..5d5494f2 100644 --- a/pkglistgen/tool.py +++ b/pkglistgen/tool.py @@ -770,4 +770,4 @@ class PkgListGen(ToolBase.ToolBase): if len(error_output) > 0: self.logger.error('Difference in yml:\n' + error_output.decode('utf-8')) - return True + return 1