Merge "Handle blank lines followed by comment in nic conversion script"
This commit is contained in:
commit
c8bbe1c3a0
@ -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.
|
@ -49,6 +49,9 @@ def to_commented_yaml(filename):
|
|||||||
with open(filename, 'r') as f:
|
with open(filename, 'r') as f:
|
||||||
comment_count = 0
|
comment_count = 0
|
||||||
for line in f:
|
for line in f:
|
||||||
|
# skip blank line
|
||||||
|
if line.isspace():
|
||||||
|
continue;
|
||||||
char_count = 0
|
char_count = 0
|
||||||
spaces = ''
|
spaces = ''
|
||||||
for char in line:
|
for char in line:
|
||||||
|
Loading…
Reference in New Issue
Block a user