fixed bug in compileapp models_to_run, thanks Anthony
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.7.4-stable+timestamp.2013.10.21.14.31.25
|
||||
Version 2.7.4-stable+timestamp.2013.10.21.21.29.21
|
||||
|
||||
@@ -501,8 +501,11 @@ def compile_controllers(folder):
|
||||
save_pyc(filename)
|
||||
os.unlink(filename)
|
||||
|
||||
def model_cmp(a,b):
|
||||
return cmp(a.count('.'),b.count('.')) or cmp(a,b)
|
||||
def model_cmp(a, b, sep='.'):
|
||||
return cmp(a.count(sep), b.count(sep)) or cmp(a, b)
|
||||
|
||||
def model_cmp_sep(a, b, sep=os.path.sep):
|
||||
return model_cmp(a,b,sep)
|
||||
|
||||
def run_models_in(environment):
|
||||
"""
|
||||
@@ -519,10 +522,9 @@ def run_models_in(environment):
|
||||
cpath = pjoin(folder, 'compiled')
|
||||
compiled = os.path.exists(cpath)
|
||||
if compiled:
|
||||
models = sorted(listdir(cpath, '^models[_.][\w.]+\.pyc$', 0),model_cmp)
|
||||
models = sorted(listdir(cpath, '^models[_.][\w.]+\.pyc$', 0), model_cmp)
|
||||
else:
|
||||
models = sorted(listdir(path, '^\w+\.py$', 0, sort=False),model_cmp)
|
||||
|
||||
models = sorted(listdir(path, '^\w+\.py$', 0, sort=False), model_cmp_sep)
|
||||
models_to_run = None
|
||||
for model in models:
|
||||
if response.models_to_run != models_to_run:
|
||||
|
||||
Reference in New Issue
Block a user