if e.errno != 17:
raise
+ try:
+ os.makedirs(constants._cache_path_)
+ except OSError, e:
+ if e.errno != 17:
+ raise
+
logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_)
_moduleLogger.info("%s %s-%s" % (constants.__app_name__, constants.__version__, constants.__build__))
_moduleLogger.info("OS: %s" % (os.uname()[0], ))
__app_magic__ = 0xdeadbeef
_data_path_ = os.path.join(os.path.expanduser("~"), ".%s" % __app_name__)
_user_settings_ = "%s/settings.ini" % _data_path_
+_cache_path_ = "%s/cache" % _data_path_
_user_logpath_ = "%s/%s.log" % (_data_path_, __app_name__)
from __future__ import with_statement
+import os
import gc
import logging
import ConfigParser
def __init__(self):
super(MormonChannelProgram, self).__init__()
- self._store = imagestore.ImageStore("../data", "../data")
+ currentPath = os.path.abspath(__file__)
+ storePath = os.path.join(os.path.split(os.path.dirname(currentPath))[0], "data")
+ self._store = imagestore.ImageStore(storePath, constants._cache_path_)
self._index = stream_index.AudioIndex()
self._player = player.Player(self._index)