diff options
author | Brent Baude <bbaude@redhat.com> | 2016-10-27 09:49:06 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-11-22 13:22:39 -0500 |
commit | edd94ebff613fd99768d9287b12d72a9409ae6bc (patch) | |
tree | 93c4c209318c91ee9a259c9529395c39ea9cfb9c /cloudinit/config/cc_rh_subscription.py | |
parent | de07968cb546347ae06c43a58e72588bd4c2f569 (diff) | |
download | vyos-cloud-init-edd94ebff613fd99768d9287b12d72a9409ae6bc.tar.gz vyos-cloud-init-edd94ebff613fd99768d9287b12d72a9409ae6bc.zip |
cloudinit/config/cc_rh_subscription.py: Remove repos before adding
A user has pointed out that upon set up of a machine, users typically
remove repos (sometimes all of them) and then add repos in. This does
make sense for a typical user.
Diffstat (limited to 'cloudinit/config/cc_rh_subscription.py')
-rw-r--r-- | cloudinit/config/cc_rh_subscription.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py index d858f65c..bd6b5f8e 100644 --- a/cloudinit/config/cc_rh_subscription.py +++ b/cloudinit/config/cc_rh_subscription.py @@ -421,11 +421,12 @@ class SubscriptionManager(object): "because it is not enabled".format(fail)) cmd = ['repos'] - if len(enable_list) > 0: - cmd.extend(enable_list) if len(disable_list) > 0: cmd.extend(disable_list) + if len(enable_list) > 0: + cmd.extend(enable_list) + try: self._sub_man_cli(cmd) except util.ProcessExecutionError as e: |