comparison rhodecode/model/meta.py @ 550:342f8434ed14

fixed creation of cache data dir, on first run
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 06 Oct 2010 11:27:41 +0200
parents 1e757ac98988
children 0a48c1ec04fc c1c1cf772337
comparison
equal deleted inserted replaced
549:f99075170eb4 550:342f8434ed14
26 #Base2 = declarative_base() 26 #Base2 = declarative_base()
27 27
28 #=============================================================================== 28 #===============================================================================
29 # CACHE OPTIONS 29 # CACHE OPTIONS
30 #=============================================================================== 30 #===============================================================================
31 cache_dir = jn(dn(dn(dn(abspath(__file__)))), 'data', 'cache') 31 cache_base = jn(dn(dn(dn(abspath(__file__)))), 'data')
32 cache_dir = jn(cache_base, 'cache')
33
34 if not os.path.isdir(cache_base):
35 os.mkdir(cache_base)
36
32 if not os.path.isdir(cache_dir): 37 if not os.path.isdir(cache_dir):
33 os.mkdir(cache_dir) 38 os.mkdir(cache_dir)
34 # set start_time to current time 39 # set start_time to current time
35 # to re-cache everything 40 # to re-cache everything
36 # upon application startup 41 # upon application startup