comparison server/ts.py @ 65:b09c164debf6

cheap_daemon()
author Matt Johnston <matt@ucc.asn.au>
date Tue, 26 Jun 2012 21:36:54 +0800
parents 340a14fcbaeb
children c5ad12670cae
comparison
equal deleted inserted replaced
64:fcec23170f03 65:b09c164debf6
169 return 169 return
170 time.sleep(length) 170 time.sleep(length)
171 171
172 def main(): 172 def main():
173 next_wake_time = 0 173 next_wake_time = 0
174
175 if '--daemon' in sys.argv:
176 utils.cheap_daemon()
174 177
175 while True: 178 while True:
176 sock = None 179 sock = None
177 try: 180 try:
178 sock = get_socket(BTADDR) 181 sock = get_socket(BTADDR)