From ad403f27e1f8067d7709ed9b184589af8309ba15 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 15 Jun 2015 15:34:03 -0400 Subject: cc_rh_subscription: fixes for python3 --- cloudinit/config/cc_rh_subscription.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py index cabebca4..6da26d25 100644 --- a/cloudinit/config/cc_rh_subscription.py +++ b/cloudinit/config/cc_rh_subscription.py @@ -384,9 +384,9 @@ class SubscriptionManager(object): "because it is not enabled".format(fail)) cmd = ['repos'] - if enable_list > 0: + if len(enable_list) > 0: cmd.extend(enable_list) - if disable_list > 0: + if len(disable_list) > 0: cmd.extend(disable_list) try: @@ -395,10 +395,10 @@ class SubscriptionManager(object): self.log_warn("Unable to alter repos due to {0}".format(e)) return False - if enable_list > 0: + if len(enable_list) > 0: self.log.debug("Enabled the following repos: %s" % (", ".join(enable_list)).replace('--enable=', '')) - if disable_list > 0: + if len(disable_list) > 0: self.log.debug("Disabled the following repos: %s" % (", ".join(disable_list)).replace('--disable=', '')) return True -- cgit v1.2.3