def main():
host = None
port = None
try:
opts, args = getopt.getopt(sys.argv[1:], "h:p:")
except getopt.GetoptError as err:
# print help information and exit:
print str(err) # will print something like "option -a not recognized"
usage()
sys.exit(2)
for o, a in opts:
if o == "-h":
host = a
elif o == "-p":
port = a
else:
assert False, "unhandled option"
x = PTDropReason(host, port)
x.send()
评论列表
文章目录