diff --git a/repos/system_upgrade/common/actors/removeobsoletegpgkeys/libraries/removeobsoleterpmgpgkeys.py b/repos/system_upgrade/common/actors/removeobsoletegpgkeys/libraries/removeobsoleterpmgpgkeys.py index bda7efa383..198c436850 100644 --- a/repos/system_upgrade/common/actors/removeobsoletegpgkeys/libraries/removeobsoleterpmgpgkeys.py +++ b/repos/system_upgrade/common/actors/removeobsoletegpgkeys/libraries/removeobsoleterpmgpgkeys.py @@ -12,14 +12,14 @@ def _get_obsolete_keys(): distribution = api.current_actor().configuration.os_release.release_id obsoleted_keys_map = get_distribution_data(distribution).get('obsoleted-keys', {}) keys = [] - try: - for version in range(7, int(get_target_major_version()) + 1): + for version in range(7, int(get_target_major_version()) + 1): + try: for key in obsoleted_keys_map[str(version)]: name, version, release = key.rsplit("-", 2) if has_package(InstalledRPM, name, version=version, release=release): keys.append(key) - except KeyError: - pass + except KeyError: + pass return keys