Merge "Handle blank lines followed by comment in nic conversion script" into stable/queens

This commit is contained in:
Zuul 2018-07-13 17:57:20 +00:00 committed by Gerrit Code Review
commit d9de432d73
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- This fixes an issue with the yaml-nic-config-2-script.py script
that converts old-style nic config files to new-style. It now handles
blank lines followed by a comment line.

View File

@ -49,6 +49,9 @@ def to_commented_yaml(filename):
with open(filename, 'r') as f:
comment_count = 0
for line in f:
# skip blank line
if line.isspace():
continue;
char_count = 0
spaces = ''
for char in line: