diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-21 20:14:04 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-21 20:14:04 -0700 |
commit | 94bf83b7a66c95eb56d2c286723d7f37c8c3de04 (patch) | |
tree | 15d2da2dfaf9b572df3a952215130316f6471d67 /cloudinit/helpers.py | |
parent | 1a0da144ef9afbc36a04cda9f17308b7eb4bcaf7 (diff) | |
download | vyos-cloud-init-94bf83b7a66c95eb56d2c286723d7f37c8c3de04.tar.gz vyos-cloud-init-94bf83b7a66c95eb56d2c286723d7f37c8c3de04.zip |
1. Update comment about ipath returning None when no datasource is active
2. Fix pylint warning on set method of config parser.
Diffstat (limited to 'cloudinit/helpers.py')
-rw-r--r-- | cloudinit/helpers.py | 5 |
1 files changed, 3 insertions, 2 deletions
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/<instance>/<name>) 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/<instance>/<name>) + # 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) |