Mercurial > templog
comparison server/ts.py @ 47:340a14fcbaeb
change timeout for readline
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 24 Jun 2012 10:36:12 +0800 |
parents | 96c336896201 |
children | b09c164debf6 |
comparison
equal
deleted
inserted
replaced
45:425af63d584d | 47:340a14fcbaeb |
---|---|
96 | 96 |
97 @retry() | 97 @retry() |
98 def turn_off(sock): | 98 def turn_off(sock): |
99 if TESTING: | 99 if TESTING: |
100 return 99 | 100 return 99 |
101 print>>sys.stderr, "sending btoff" | |
101 sock.send("btoff\n"); | 102 sock.send("btoff\n"); |
102 # read newline | 103 # read newline |
103 l = readline(sock) | 104 l = readline(sock) |
104 if not l: | 105 if not l: |
105 print>>sys.stderr, "Bad response to btoff\n" | 106 print>>sys.stderr, "Bad response to btoff\n" |