summaryrefslogtreecommitdiff
path: root/cloudinit/distros/parsers/__init__.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-11-12 14:30:08 -0800
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-11-12 14:30:08 -0800
commit82e90789f11b5371b352a477b75cad0c5d1457ec (patch)
treebfe3fc01c2f70f8af2f438cdc32e50a820e76baa /cloudinit/distros/parsers/__init__.py
parentbbe325c902ef3a3b8845cd3c1bb8bee0c3c74a89 (diff)
downloadvyos-cloud-init-82e90789f11b5371b352a477b75cad0c5d1457ec.tar.gz
vyos-cloud-init-82e90789f11b5371b352a477b75cad0c5d1457ec.zip
Cleanup of /etc/hosts ordering and pep8/pylint adjustments.
Fix how the comparison of a fqdn and its aliases was done via sorting instead of existence checking which is the better way to check if a alias already exists as well as cleanup the new files pep8/pylint issues. LP: #1078097
Diffstat (limited to 'cloudinit/distros/parsers/__init__.py')
-rw-r--r--cloudinit/distros/parsers/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cloudinit/distros/parsers/__init__.py b/cloudinit/distros/parsers/__init__.py
index 8334a5e6..1c413eaa 100644
--- a/cloudinit/distros/parsers/__init__.py
+++ b/cloudinit/distros/parsers/__init__.py
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def chop_comment(text, comment_chars):
comment_locations = [text.find(c) for c in comment_chars]
comment_locations = [c for c in comment_locations if c != -1]