Author: duncan
Date: Wed Mar 19 03:06:04 2008
New Revision: 10547
Log:
freevo simply exits when kaa has not been installed correctly
Fix for when kaa has not been installed correctly
Modified:
branches/rel-1-7/freevo/src/config.py
branches/rel-1-7/freevo/src/main.py
branches/rel-1/freevo/src/config.py
branches/rel-1/freevo/src/main.py
Modified: branches/rel-1-7/freevo/src/config.py
==============================================================================
--- branches/rel-1-7/freevo/src/config.py (original)
+++ branches/rel-1-7/freevo/src/config.py Wed Mar 19 03:06:04 2008
@@ -63,7 +63,7 @@
locale.setlocale(locale.LC_TIME, '')
-if float(sys.version[0:3]) >= 2.3:
+if sys.hexversion >= 0x02030000:
import warnings
warnings.simplefilter("ignore", category=FutureWarning)
warnings.simplefilter("ignore", category=DeprecationWarning)
@@ -319,15 +319,21 @@
HELPER = 0
IS_RECORDSERVER = 0
IS_WEBSERVER = 0
+IS_ENCODINGSERVER = 0
+IS_RSSSERVER = 0
__builtin__.__dict__['__freevo_app__'] =
os.path.splitext(os.path.basename(sys.argv[0]))[0]
if sys.argv[0].find('main.py') == -1:
HELPER=1
-if sys.argv[0].find('recordserver.py') != -1:
- IS_RECORDSERVER = 1
-elif sys.argv[0].find('webserver.py') != -1:
- IS_WEBSERVER = 1
+ if sys.argv[0].find('recordserver.py') != -1:
+ IS_RECORDSERVER = 1
+ elif sys.argv[0].find('webserver.py') != -1:
+ IS_WEBSERVER = 1
+ elif sys.argv[0].find('encodingserver.py') != -1:
+ IS_ENCODINGSERVER = 1
+ elif sys.argv[0].find('rssserver.py') != -1:
+ IS_RSSSERVER = 1
#
# Send debug to stdout as well as to the logfile?
@@ -496,8 +502,7 @@
#
# Config file handling
#
-cfgfilepath = ['.', os.path.expanduser('~/.freevo'), '/etc/freevo',
- '/usr/local/etc/freevo']
+cfgfilepath = ['.', os.path.expanduser('~/.freevo'), '/etc/freevo',
'/usr/local/etc/freevo']
#
@@ -911,10 +916,8 @@
import pickle
file = XMLTV_FILE
- path = FREEVO_CACHEDIR
- pfile = 'xmltv_channels.pickle'
- pname = os.path.join(path, pfile)
+ pname = os.path.join(FREEVO_CACHEDIR, 'xmltv_channels.pickle')
if not os.path.isfile(file):
if not HELPER:
@@ -926,15 +929,15 @@
print
return []
- elif os.path.isfile(pname) and (os.path.getmtime(pname) >
- os.path.getmtime(file)):
+ elif os.path.isfile(pname) and (os.path.getmtime(pname) >
os.path.getmtime(file)):
try:
f = open(pname, 'r')
data = pickle.load(f)
f.close()
return data
except:
- print 'Error: unable to read cachefile %s' % pname
+ if not HELPER:
+ print 'Error: unable to read cachefile %s' % pname
return []
else:
@@ -981,7 +984,8 @@
pickle.dump(chanlist, f, 1)
f.close()
except IOError:
- print 'Error: unable to save to cachefile %s' % pname
+ if not HELPER:
+ print 'Error: unable to save to cachefile %s' % pname
for c in chanlist:
if c[2] == 0:
@@ -995,7 +999,8 @@
print
break
else:
- print 'XMTV: Auto-detected channel list'
+ if not HELPER:
+ print 'XMTV: Auto-detected channel list'
return chanlist
Modified: branches/rel-1-7/freevo/src/main.py
==============================================================================
--- branches/rel-1-7/freevo/src/main.py (original)
+++ branches/rel-1-7/freevo/src/main.py Wed Mar 19 03:06:04 2008
@@ -38,16 +38,6 @@
import traceback
import signal
-import config
-import rc
-rc.get_singleton(is_plugin=0)
-
-# i18n support
-
-# First load the xml module. It's not needed here but it will mess
-# up with the domain we set (set it from freevo 4Suite). By loading it
-# first, Freevo will override the 4Suite setting to freevo
-
try:
from xml.utils import qp_xml
from xml.dom import minidom
@@ -60,11 +50,14 @@
import kaa.metadata as mmpython
import kaa.imlib2 as Image
+ import config
+ import rc
+ rc.get_singleton(is_plugin=0)
-except ImportError, i:
+except ImportError, why:
print 'Can\'t find all Python dependencies:'
- print i
- if str(i)[-7:] == 'Numeric':
+ print why
+ if str(why)[-7:] == 'Numeric':
print 'You need to recompile pygame after installing Numeric!'
print
print 'Not all requirements of Freevo are installed on your system.'
Modified: branches/rel-1/freevo/src/config.py
==============================================================================
--- branches/rel-1/freevo/src/config.py (original)
+++ branches/rel-1/freevo/src/config.py Wed Mar 19 03:06:04 2008
@@ -63,7 +63,7 @@
locale.setlocale(locale.LC_TIME, '')
-if float(sys.version[0:3]) >= 2.3:
+if sys.hexversion >= 0x02030000:
import warnings
warnings.simplefilter("ignore", category=FutureWarning)
warnings.simplefilter("ignore", category=DeprecationWarning)
@@ -319,15 +319,21 @@
HELPER = 0
IS_RECORDSERVER = 0
IS_WEBSERVER = 0
+IS_ENCODINGSERVER = 0
+IS_RSSSERVER = 0
__builtin__.__dict__['__freevo_app__'] =
os.path.splitext(os.path.basename(sys.argv[0]))[0]
if sys.argv[0].find('main.py') == -1:
HELPER=1
-if sys.argv[0].find('recordserver.py') != -1:
- IS_RECORDSERVER = 1
-elif sys.argv[0].find('webserver.py') != -1:
- IS_WEBSERVER = 1
+ if sys.argv[0].find('recordserver.py') != -1:
+ IS_RECORDSERVER = 1
+ elif sys.argv[0].find('webserver.py') != -1:
+ IS_WEBSERVER = 1
+ elif sys.argv[0].find('encodingserver.py') != -1:
+ IS_ENCODINGSERVER = 1
+ elif sys.argv[0].find('rssserver.py') != -1:
+ IS_RSSSERVER = 1
#
# Send debug to stdout as well as to the logfile?
@@ -496,8 +502,7 @@
#
# Config file handling
#
-cfgfilepath = ['.', os.path.expanduser('~/.freevo'), '/etc/freevo',
- '/usr/local/etc/freevo']
+cfgfilepath = ['.', os.path.expanduser('~/.freevo'), '/etc/freevo',
'/usr/local/etc/freevo']
#
Modified: branches/rel-1/freevo/src/main.py
==============================================================================
--- branches/rel-1/freevo/src/main.py (original)
+++ branches/rel-1/freevo/src/main.py Wed Mar 19 03:06:04 2008
@@ -38,16 +38,6 @@
import traceback
import signal
-import config
-import rc
-rc.get_singleton(is_helper=0)
-
-# i18n support
-
-# First load the xml module. It's not needed here but it will mess
-# up with the domain we set (set it from freevo 4Suite). By loading it
-# first, Freevo will override the 4Suite setting to freevo
-
try:
from xml.utils import qp_xml
from xml.dom import minidom
@@ -61,11 +51,14 @@
import kaa.metadata as mmpython
import kaa.imlib2 as Image
+ import config
+ import rc
+ rc.get_singleton(is_helper=0)
-except ImportError, i:
+except ImportError, why:
print 'Can\'t find all Python dependencies:'
- print i
- if str(i)[-7:] == 'Numeric':
+ print why
+ if str(why)[-7:] == 'Numeric':
print 'You need to recompile pygame after installing Numeric!'
print
print 'Not all requirements of Freevo are installed on your system.'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog