From 94bf83b7a66c95eb56d2c286723d7f37c8c3de04 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 21 Jun 2012 20:14:04 -0700 Subject: 1. Update comment about ipath returning None when no datasource is active 2. Fix pylint warning on set method of config parser. --- cloudinit/helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/helpers.py b/cloudinit/helpers.py index 6751f4a5..7a2ac6b8 100644 --- a/cloudinit/helpers.py +++ b/cloudinit/helpers.py @@ -286,7 +286,7 @@ class Paths(object): cpath = os.path.join(cpath, add_on) return cpath - # get_ipath : get the instance path for a name in pathmap + # _get_ipath : get the instance path for a name in pathmap # (/var/lib/cloud/instances//) def _get_ipath(self, name=None): if not self.datasource: @@ -302,6 +302,7 @@ class Paths(object): # get_ipath : get the instance path for a name in pathmap # (/var/lib/cloud/instances//) + # returns None + warns if no active datasource.... def get_ipath(self, name=None): ipath = self._get_ipath(name) if not ipath: @@ -337,7 +338,7 @@ class DefaultingConfigParser(RawConfigParser): pass return value - def set(self, section, option, value): + def set(self, section, option, value=None): if not self.has_section(section) and section.lower() != 'default': self.add_section(section) RawConfigParser.set(self, section, option, value) -- cgit v1.2.3