diff options
Diffstat (limited to 'cloudinit/config/cc_rh_subscription.py')
-rw-r--r-- | cloudinit/config/cc_rh_subscription.py | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py index d858f65c..7f36cf8f 100644 --- a/cloudinit/config/cc_rh_subscription.py +++ b/cloudinit/config/cc_rh_subscription.py @@ -1,20 +1,8 @@ -# vi: ts=4 expandtab -# -# Copyright (C) 2015 Red Hat, Inc. -# -# Author: Brent Baude <bbaude@redhat.com> +# Copyright (C) 2015 Red Hat, Inc. # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 3, as -# published by the Free Software Foundation. +# Author: Brent Baude <bbaude@redhat.com> # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# This file is part of cloud-init. See LICENSE file for license information. """ RedHat Subscription @@ -421,11 +409,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: @@ -442,3 +431,5 @@ class SubscriptionManager(object): def is_configured(self): return bool((self.userid and self.password) or self.activation_key) + +# vi: ts=4 expandtab |