Author: duncan
Date: Mon Nov 5 08:24:05 2007
New Revision: 10080
Log:
Added a USE_NETWORK check
Modified:
branches/rel-1-7/freevo/src/audio/plugins/coversearch.py
branches/rel-1-7/freevo/src/plugins/headlines.py
branches/rel-1-7/freevo/src/plugins/idlebar/weather.py
branches/rel-1-7/freevo/src/plugins/oneclick.py
branches/rel-1-7/freevo/src/plugins/weather.py
branches/rel-1-7/freevo/src/video/plugins/imdb.py
Modified: branches/rel-1-7/freevo/src/audio/plugins/coversearch.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/coversearch.py (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/coversearch.py Mon Nov 5
08:24:05 2007
@@ -89,7 +89,7 @@
def __init__(self, license=None):
if not config.USE_NETWORK:
- self.reason = 'no network'
+ self.reason = 'USE_NETWORK not enabled'
return
if license:
Modified: branches/rel-1-7/freevo/src/plugins/headlines.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/headlines.py (original)
+++ branches/rel-1-7/freevo/src/plugins/headlines.py Mon Nov 5 08:24:05 2007
@@ -77,7 +77,10 @@
"""
make an init func that creates the cache dir if it don't exist
"""
- if not hasattr(config, 'HEADLINES_LOCATIONS'):
+ if not config.USE_NETWORK:
+ self.reason = 'USE_NETWORK not enabled'
+ return
+ if not config.HEADLINES_LOCATIONS:
self.reason = 'HEADLINES_LOCATIONS not defined'
return
plugin.MainMenuPlugin.__init__(self)
Modified: branches/rel-1-7/freevo/src/plugins/idlebar/weather.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/idlebar/weather.py (original)
+++ branches/rel-1-7/freevo/src/plugins/idlebar/weather.py Mon Nov 5
08:24:05 2007
@@ -49,6 +49,9 @@
"""
def __init__(self, zone='CYYZ', units='C'):
+ if not config.USE_NETWORK:
+ self.reason = 'USE_NETWORK not enabled'
+ return
IdleBarPlugin.__init__(self)
self.plugin_name = 'idlebar.weather'
self.TEMPUNITS = units
Modified: branches/rel-1-7/freevo/src/plugins/oneclick.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/oneclick.py (original)
+++ branches/rel-1-7/freevo/src/plugins/oneclick.py Mon Nov 5 08:24:05 2007
@@ -218,7 +218,10 @@
'''
'''
_debug_('PluginInterface.__init__()', 2)
- if not hasattr(config, 'ONECLICK_LOCATIONS'):
+ if not config.USE_NETWORK:
+ self.reason = 'USE_NETWORK not enabled'
+ return
+ if not config.ONECLICK_LOCATIONS:
self.reason = 'ONECLICK_LOCATIONS not defined'
return
plugin.MainMenuPlugin.__init__(self)
@@ -228,7 +231,7 @@
'''
_debug_('config()', 2)
return [
- ('ONECLICK_LOCATIONS', [('USNC0559', 0)], 'Location codes for
current conditions and forecasts'),
+ ('ONECLICK_LOCATIONS', None, 'Location codes for current
conditions and forecasts'),
('ONECLICK_URL_CURC',
'http://ff.1click.weather.com/weather/local/%s?cc=*%s', 'Current Conditions
URL'),
('ONECLICK_URL_DAYF',
'http://ff.1click.weather.com/weather/local/%s?dayf=5%s', 'Day Forecast URL'),
('ONECLICK_URL_ELOC',
'http://ff.1click.weather.com/weather/local/%s?eloc=st', 'Extended Location
URL'),
Modified: branches/rel-1-7/freevo/src/plugins/weather.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/weather.py (original)
+++ branches/rel-1-7/freevo/src/plugins/weather.py Mon Nov 5 08:24:05 2007
@@ -243,14 +243,17 @@
"""
def __init__(self):
- if not hasattr(config, 'PLUGIN_WEATHER_LOCATIONS'):
+ if not config.USE_NETWORK:
+ self.reason = 'USE_NETWORK not enabled'
+ return
+ if not config.PLUGIN_WEATHER_LOCATIONS:
self.reason = 'PLUGIN_WEATHER_LOCATIONS not defined'
return
plugin.MainMenuPlugin.__init__(self)
def config(self):
return [
- ('PLUGIN_WEATHER_LOCATIONS', [("USNC0559", 0)], "Location codes to
grab forecasts for"),
+ ('PLUGIN_WEATHER_LOCATIONS', None, "Location codes to grab
forecasts for"),
('PLUGIN_WEATHER_DATAURL',
'http://www.tpfans.com/rss/weather.php?Citycode=%s&Language=%s', 'Data URL'),
('PLUGIN_WEATHER_MAPURL',
'http://www.weather.com/weather/map/%s?from=LAPmaps', 'Radar Map URL')
]
Modified: branches/rel-1-7/freevo/src/video/plugins/imdb.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/imdb.py (original)
+++ branches/rel-1-7/freevo/src/video/plugins/imdb.py Mon Nov 5 08:24:05 2007
@@ -60,7 +60,7 @@
def __init__(self, license=None):
if not config.USE_NETWORK:
- self.reason = 'no network'
+ self.reason = 'USE_NETWORK not enabled'
return
self.season = None
self.episode = None
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog