1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 09:16:14 +01:00

Merge pull request #1359 from dmach/checkout-dont-print-open-requests

Change 'checkout' command to print open requests only when running in an interactive terminal
This commit is contained in:
Dirk Mueller 2023-07-20 10:49:12 +02:00 committed by GitHub
commit 1284867dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5267,7 +5267,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
server_service_files=opts.server_side_source_service_files,
progress_obj=self.download_progress, size_limit=opts.limit_size,
meta=opts.meta, outdir=opts.output_dir)
print_request_list(apiurl, project, package)
if os.isatty(sys.stdout.fileno()):
print_request_list(apiurl, project, package)
elif project:
sep = '/' if not opts.output_dir and conf.config['checkout_no_colon'] else conf.config['project_separator']
@ -5328,7 +5329,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
server_service_files=opts.server_side_source_service_files,
progress_obj=self.download_progress, size_limit=opts.limit_size,
meta=opts.meta)
print_request_list(apiurl, project)
if os.isatty(sys.stdout.fileno()):
print_request_list(apiurl, project)
else:
self.argparse_error("Incorrect number of arguments.")