summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_phone_home.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-22 22:04:37 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-22 22:04:37 -0700
commit85d5753d549e2d6ff69bbcc946e37d8fdac44868 (patch)
tree4851d3320777531680d3247f3e25afd88a26b9c9 /cloudinit/config/cc_phone_home.py
parentf8122ecf95aa347969829a217b3894e07158f994 (diff)
downloadvyos-cloud-init-85d5753d549e2d6ff69bbcc946e37d8fdac44868.tar.gz
vyos-cloud-init-85d5753d549e2d6ff69bbcc946e37d8fdac44868.zip
1. Adjust the logging of phone home module when its not enabled
2. Fix pylint warning in userdata about unused variable
Diffstat (limited to 'cloudinit/config/cc_phone_home.py')
-rw-r--r--cloudinit/config/cc_phone_home.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_phone_home.py b/cloudinit/config/cc_phone_home.py
index d929eb64..ae1349eb 100644
--- a/cloudinit/config/cc_phone_home.py
+++ b/cloudinit/config/cc_phone_home.py
@@ -49,6 +49,8 @@ def handle(name, cfg, cloud, log, args):
ph_cfg = util.read_conf(args[0])
else:
if not 'phone_home' in cfg:
+ log.debug(("Skipping module named %s, "
+ "no 'phone_home' configuration found"), name)
return
ph_cfg = cfg['phone_home']
@@ -59,7 +61,7 @@ def handle(name, cfg, cloud, log, args):
url = ph_cfg['url']
post_list = ph_cfg.get('post', 'all')
- tries = ph_cfg.get('tries', 10)
+ tries = ph_cfg.get('tries')
try:
tries = int(tries)
except: