[mythtv] Suppressing debug output in Python bindings
Robin Gilks
g8ecj at gilks.org
Sat Mar 20 05:05:08 UTC 2010
I have a little script that checks that a DVB card is free before using it
to collect EPG data.
#!/usr/bin/python
import sys
from MythTV import MythTV
if len(sys.argv) < 2:
print "Usage: myth_recorder_status <RECORDER> [<RECORDER> ...]"
sys.exit(2)
m = MythTV()
recorders_that_exist = m.getRecorderList()
res = 'FREE'
for recorder in sys.argv[1:]:
if int(recorder) not in recorders_that_exist:
print 'NOT VALID RECORDER (%s)' % recorder
sys.exit(1)
if m.isRecording(recorder):
res = 'RECORDING'
print res
sys.exit(0)
Since upgrading to trunk it fails due to verbose output of the following
form...
2010-03-20 16:54:53.333 Python Database Connection: Using connection
settings from /home/mythtv/.mythtv/config.xml
Not very helpful when I'm looking for the script to return 'FREE' or
'RECORDING'.
Any ideas on how to suppress this output anyone?
Cheers
--
Robin Gilks
More information about the mythtv-dev
mailing list