Skip to content

Commit

Permalink
Fix duplicate code block
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hoogeveen committed Dec 23, 2024
1 parent d87c21b commit 3c97d00
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions plugins/modules/zypper.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,25 +380,6 @@ def parse_zypper_xml(m, cmd, fail_not_found=True, packages=None):

m.fail_json(msg='Zypper run command failed with return code %s.' % rc, rc=rc, stdout=stdout, stderr=stderr, cmd=cmd)

def get_simple_errors(dom):
simple_errors = []
message_xml_tags = dom.getElementsByTagName('message')
for x in message_xml_tags:
simple_errors.append(x.firstChild.data)
return " ".join(simple_errors)


def get_simple_errors(dom):
simple_errors = []
message_xml_tags = dom.getElementsByTagName('message')

if message_xml_tags is None:
return None

for x in message_xml_tags:
simple_errors.append(x.firstChild.data)
return " \n".join(simple_errors)


def get_simple_errors(dom):
simple_errors = []
Expand Down

0 comments on commit 3c97d00

Please sign in to comment.