Code Duplication    Length = 11-11 lines in 2 locations

ssg/ansible.py 1 location

@@ 67-77 (lines=11) @@
64
        return list(one_or_more_strings)
65
66
67
def update_yaml_list_or_string(current_contents, new_contents):
68
    result = []
69
    if current_contents:
70
        result += _strings_to_list(current_contents)
71
    if new_contents:
72
        result += _strings_to_list(new_contents)
73
    if not result:
74
        result = ""
75
    if len(result) == 1:
76
        result = result[0]
77
    return result
78
79
80
class AnsibleRemediation(object):

ssg/yaml.py 1 location

@@ 192-202 (lines=11) @@
189
        return list(one_or_more_strings)
190
191
192
def update_yaml_list_or_string(current_contents, new_contents):
193
    result = []
194
    if current_contents:
195
        result += _strings_to_list(current_contents)
196
    if new_contents:
197
        result += _strings_to_list(new_contents)
198
    if not result:
199
        result = ""
200
    if len(result) == 1:
201
        result = result[0]
202
    return result
203