Authored by root

Remove redundant print

... ... @@ -130,12 +130,18 @@ class EMRClusterScanner(object):
while retry > 0:
print cmd
output = os.popen(cmd).read()
if 'changed=1' not in output or 'unreachable=1' in output:
if 'unreachable=1' in output or 'failed=1' in output or 'changed=1' not in output:
with open('/var/log/supervisor/ansible.err','a') as f:
f.write(output+'\n\n')
f.close()
retry-=1
print "重新同步DNS...还剩{0}次".format(retry)
time.sleep(300)
continue
else:
with open('/var/log/supervisor/ansible.log','a') as f:
f.write(output+'\n\n')
f.close()
print "DNS 同步成功"
return True
return False
... ...