Merge branch 'refs/heads/develop'
This commit is contained in:
@@ -50,7 +50,7 @@ class Loader(object):
|
||||
# Create logging dir
|
||||
self.log_dir = os.path.join(self.data_dir, 'logs');
|
||||
if not os.path.isdir(self.log_dir):
|
||||
os.mkdir(self.log_dir)
|
||||
os.makedirs(self.log_dir)
|
||||
|
||||
# Logging
|
||||
from couchpotato.core.logger import CPLog
|
||||
|
||||
@@ -5,6 +5,8 @@ from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.notifications.base import Notification
|
||||
import xmpp
|
||||
|
||||
print xmpp
|
||||
|
||||
|
||||
log = CPLog(__name__)
|
||||
|
||||
@@ -126,13 +126,23 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
|
||||
else:
|
||||
db.create()
|
||||
|
||||
# Force creation of cachedir
|
||||
log_dir = sp(log_dir)
|
||||
cache_dir = sp(os.path.join(data_dir, 'cache'))
|
||||
python_cache = sp(os.path.join(cache_dir, 'python'))
|
||||
|
||||
if not os.path.exists(cache_dir):
|
||||
os.mkdir(cache_dir)
|
||||
if not os.path.exists(python_cache):
|
||||
os.mkdir(python_cache)
|
||||
|
||||
# Register environment settings
|
||||
Env.set('app_dir', sp(base_path))
|
||||
Env.set('data_dir', sp(data_dir))
|
||||
Env.set('log_path', sp(os.path.join(log_dir, 'CouchPotato.log')))
|
||||
Env.set('db', db)
|
||||
Env.set('cache_dir', sp(os.path.join(data_dir, 'cache')))
|
||||
Env.set('cache', FileSystemCache(sp(os.path.join(Env.get('cache_dir'), 'python'))))
|
||||
Env.set('cache_dir', cache_dir)
|
||||
Env.set('cache', FileSystemCache(python_cache))
|
||||
Env.set('console_log', options.console_log)
|
||||
Env.set('quiet', options.quiet)
|
||||
Env.set('desktop', desktop)
|
||||
|
||||
Reference in New Issue
Block a user