rfh, wfh = latclient.get_fh()
results = {'error': retries, 'closed': retries, 'open': retries}
test_string = "got wombles?"
- syslog.syslog(30, "start check_LAT_service:" + servicename)
+ syslog.syslog(142, "start check_LAT_service:" + servicename)
# Only return after n(retries) consistent results, although not necessarily
# in order. This means we poll at least (retries) and up to (retries ** 2) times.
# This is mtearle's original code. No idea if it's the Right Thing.
while True:
- syslog.syslog(30, "running c_L_s loop:" + servicename)
+ syslog.syslog(142, "running c_L_s loop:" + servicename)
try:
wfh.write(test_string)
wfh.flush()
except:
results['error'] -= 1
if results['error'] == 0: return -1
- syslog.syslog(30, "c_L_s write error:" + servicename)
+ syslog.syslog(142, "c_L_s write error:" + servicename)
continue
- syslog.syslog(30, "c_Ls written data to " + servicename)
+ syslog.syslog(142, "c_Ls written data to " + servicename)
rr, wr, er = select([rfh], [], [], 3.0)
if rfh not in rr:
results['open'] -= 1
if results['open'] == 0: return 1
- syslog.syslog(30, "c_L_s open: " + servicename)
+ syslog.syslog(142, "c_L_s open: " + servicename)
continue
- syslog.syslog(30, "c_L_s select() succeeded: " + servicename)
+ syslog.syslog(142, "c_L_s select() succeeded: " + servicename)
recv = rfh.read(len(test_string))
- syslog.syslog(30, "c_L_s read() succeeded: " + servicename)
+ syslog.syslog(142, "c_L_s read() succeeded: " + servicename)
if recv <> test_string:
- syslog.syslog(30, "c_L_s not the data we sent " + servicename)
+ syslog.syslog(142, "c_L_s not the data we sent " + servicename)
results['error'] -= 1
if results['error'] == 0: return -1
continue
results['closed'] -= 1
- syslog.syslog(30, "c_L_s closed " + servicename)
+ syslog.syslog(142, "c_L_s closed " + servicename)
if results['closed'] == 0: return 0
class Door(dbus.service.Object):