Add comment explaining success return codes

Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
This commit is contained in:
Michael Calmer 2022-07-11 10:36:50 +02:00 committed by Daniel Wozniak
parent 38e044b90d
commit d71470a5ba

View file

@ -1450,6 +1450,8 @@ def refresh_db(force=None, root=None, **kwargs):
if kwargs.get("gpgautoimport", False):
global_opts.append("--gpg-auto-import-keys")
# We do the actual call to zypper refresh.
# We ignore retcode 6 which is returned when there are no repositories defined.
out = __zypper__(root=root).refreshable.call(
*global_opts, *refresh_opts, success_retcodes=[0, 6]
)