From edd94ebff613fd99768d9287b12d72a9409ae6bc Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Thu, 27 Oct 2016 09:49:06 -0500 Subject: 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. --- cloudinit/config/cc_rh_subscription.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cloudinit') 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: -- cgit v1.2.3