ssg/ansible.py 1 location
|
@@ 68-78 (lines=11) @@
|
| 65 |
|
return list(one_or_more_strings) |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
def update_yaml_list_or_string(current_contents, new_contents): |
| 69 |
|
result = [] |
| 70 |
|
if current_contents: |
| 71 |
|
result += _strings_to_list(current_contents) |
| 72 |
|
if new_contents: |
| 73 |
|
result += _strings_to_list(new_contents) |
| 74 |
|
if not result: |
| 75 |
|
result = "" |
| 76 |
|
if len(result) == 1: |
| 77 |
|
result = result[0] |
| 78 |
|
return result |
| 79 |
|
|
ssg/yaml.py 1 location
|
@@ 207-217 (lines=11) @@
|
| 204 |
|
return list(one_or_more_strings) |
| 205 |
|
|
| 206 |
|
|
| 207 |
|
def update_yaml_list_or_string(current_contents, new_contents): |
| 208 |
|
result = [] |
| 209 |
|
if current_contents: |
| 210 |
|
result += _strings_to_list(current_contents) |
| 211 |
|
if new_contents: |
| 212 |
|
result += _strings_to_list(new_contents) |
| 213 |
|
if not result: |
| 214 |
|
result = "" |
| 215 |
|
if len(result) == 1: |
| 216 |
|
result = result[0] |
| 217 |
|
return result |
| 218 |
|
|