1 import ConfigParser
, os
2 from ConfigParser
import NoOptionError
4 BLACKLIST_169
= ('540', '649')
6 config
= ConfigParser
.ConfigParser()
7 p
= os
.path
.dirname(__file__
)
8 config
.read(os
.path
.join(p
, 'pyTivo.conf'))
10 def get169Setting(tsn
):
14 if config
.has_section('_tivo_' + tsn
):
15 if config
.has_option('_tivo_' + tsn
, 'aspect169'):
16 if config
.get('_tivo_' + tsn
, 'aspect169').lower() == 'true':
21 if tsn
[:3] in BLACKLIST_169
:
27 return filter( lambda x
: not(x
.startswith('_tivo_') or x
== 'Server'), config
.sections())
31 debug
= config
.get('Server', 'debug')
32 if debug
.lower() == 'true':