Skip to content

Commit

Permalink
adds loop to fix len(dns) - fixed. issue 79
Browse files Browse the repository at this point in the history
resolve apel#79
  • Loading branch information
DanielPerkins7 committed Aug 2, 2023
1 parent a5b8e34 commit fb427c0
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions ssm/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,26 +386,6 @@ def get_dns(dn_file, log):
finally:
if f is not None:
f.close()
<<<<<<< Updated upstream
# If no valid DNs, SSM cannot receive any messages.
if len(dns) == 0:
fails = 0
while fails < 3 and len(dns) == 0:
for line in lines:
if line.isspace() or line.strip().startswith('#'):
continue
elif line.strip().startswith('/'):
dns.append(line.strip())
else:
log.warning('DN in incorrect format: %s', line)
if len(dns) == 0:
raise Ssm2Exception('No valid DNs found in %s. SSM will not start' % dn_file)

finally:
if f is not None:
f.close()
=======
>>>>>>> Stashed changes

log.debug('%s DNs found.', len(dns))
return dns

1 comment on commit fb427c0

@DanielPerkins7
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the section that I actually changed is from line 374 down to line 388. The highlighted stuff is just duplicated stuff that was not there in the first place.

Please sign in to comment.