Exit with an error status code, printing a message to stderr if specified
(errno=E_GENERIC,message=None,*args)
| 104 | else: sys.stderr.write(msgfmt) |
| 105 | |
| 106 | def exit(errno=E_GENERIC,message=None,*args): |
| 107 | """Exit with an error status code, printing a message to stderr if specified""" |
| 108 | if message: stderr(message,*args) |
| 109 | sys.exit(errno) |
| 110 | |
| 111 | def resolve(host,port): |
| 112 | return [ (x[4][0],len(x[4])+2) for x in socket.getaddrinfo(host,port,socket.AF_UNSPEC,socket.SOCK_STREAM, 0, socket.AI_PASSIVE) ] |
no test coverage detected