summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-06-15 15:34:03 -0400
committerScott Moser <smoser@ubuntu.com>2015-06-15 15:34:03 -0400
commitad403f27e1f8067d7709ed9b184589af8309ba15 (patch)
treea96ab762d363be2504b741ee4e452809bbf4304a
parente6d4bfd6d3b24c1106ecd38e51355243e6558983 (diff)
downloadvyos-cloud-init-ad403f27e1f8067d7709ed9b184589af8309ba15.tar.gz
vyos-cloud-init-ad403f27e1f8067d7709ed9b184589af8309ba15.zip
cc_rh_subscription: fixes for python3
-rw-r--r--cloudinit/config/cc_rh_subscription.py8
1 files 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