Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds repeats to try fix len(dns). Issue79 #252

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Prev Previous commit
Next Next commit
adds loop to fix len(dns) - fixed. issue 79
resolve #79
DanielPerkins7 committed Aug 2, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit fb427c03c99a0812afdc07ea225a091ff64a9e04
20 changes: 0 additions & 20 deletions ssm/agents.py
Original file line number Diff line number Diff line change
@@ -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