summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2015-05-28 09:02:11 -0500
committerBrent Baude <bbaude@redhat.com>2015-05-28 09:02:11 -0500
commit3aa0fcc5983416d743fac6af1d40ca791feb23af (patch)
treea76264bff1590a51d68b86650e6346616c83be52 /cloudinit
parentd9470a429935d4a5e12a5a3d1f57867362f92c57 (diff)
downloadvyos-cloud-init-3aa0fcc5983416d743fac6af1d40ca791feb23af.tar.gz
vyos-cloud-init-3aa0fcc5983416d743fac6af1d40ca791feb23af.zip
Tightening up an error message and isinstance usage based on feedback from Dan
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_rh_subscription.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py
index db3d5525..e57e8a07 100644
--- a/cloudinit/config/cc_rh_subscription.py
+++ b/cloudinit/config/cc_rh_subscription.py
@@ -50,7 +50,7 @@ def handle(_name, cfg, _cloud, log, _args):
sm.log.debug("Completed auto-attach")
if sm.pools is not None:
- if not isinstance(sm.pools, (list)):
+ if not isinstance(sm.pools, list):
pool_fail = "Pools must in the format of a list"
raise SubscriptionError(pool_fail)
@@ -122,8 +122,8 @@ class SubscriptionManager(object):
if (self.auto_attach is not None) and \
not (util.is_true(self.auto_attach) or
util.is_false(self.auto_attach)):
- not_bool = "The key auto-attach must be a value of "\
- "either True or False"
+ not_bool = "The key auto-attach must be a boolean value "\
+ "(True/False "
return False, not_bool
if (self.servicelevel is not None) and \
@@ -337,11 +337,11 @@ class SubscriptionManager(object):
executes the action to disable or enable
'''
- if (erepos is not None) and (not isinstance(erepos, (list))):
+ if (erepos is not None) and (not isinstance(erepos, list)):
self.log_warn("Repo IDs must in the format of a list.")
return False
- if (drepos is not None) and (not isinstance(drepos, (list))):
+ if (drepos is not None) and (not isinstance(drepos, list)):
self.log_warn("Repo IDs must in the format of a list.")
return False