Skip to content

Instantly share code, notes, and snippets.

@craked5
Created August 27, 2015 00:30
Show Gist options
  • Save craked5/9b6c03389c52a18532ea to your computer and use it in GitHub Desktop.
Save craked5/9b6c03389c52a18532ea to your computer and use it in GitHub Desktop.
try:
tempfile = open('util/fail_ip.txt', 'a')
tempfile.write('A thread ' + str(thread) +' teve timeout no ip '+ str(host) +' as ' + str(time.strftime("%H:%M:%S"))+'\n')
tempfile.flush()
os.fsync(tempfile.fileno())
tempfile.close()
except IOError:
print "Erro ao escrever no ficheiro"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment