|
a/mail/app/handlers/react.py |
|
b/mail/app/handlers/react.py |
|
... |
|
... |
35 |
pylons.c._push_object(EmptyClass())
|
35 |
pylons.c._push_object(EmptyClass())
|
36 |
pylons.g._push_object(Globals())
|
36 |
pylons.g._push_object(Globals())
|
37 |
ming.configure(**conf)
|
37 |
ming.configure(**conf)
|
38 |
|
38 |
|
39 |
try:
|
39 |
try:
|
40 |
valid = ProjectContents(Project.m.find({"name":proj, "database":"projects:"+proj}).one())
|
40 |
valid = ProjectContents(Project.query.find({"name":proj, "database":"projects:"+proj}).one())
|
41 |
except:
|
41 |
except:
|
42 |
try:
|
42 |
try:
|
43 |
valid = ProjectContents(Project.m.find({"name":proj, "database":"users:"+proj}).one())
|
43 |
valid = ProjectContents(Project.query.find({"name":proj, "database":"users:"+proj}).one())
|
44 |
except:
|
44 |
except:
|
45 |
logging.debug('REACT: project "' + proj + '" does not exist as project or user')
|
45 |
logging.debug('REACT: project "' + proj + '" does not exist as project or user')
|
46 |
else:
|
46 |
else:
|
47 |
logging.debug('REACT: project "' + proj + '" exists as user with _id:' + valid._id)
|
47 |
logging.debug('REACT: project "' + proj + '" exists as user with _id:' + valid._id)
|
48 |
else:
|
48 |
else:
|
49 |
logging.debug('REACT: project "' + proj + '" exists as project with _id:' + valid._id)
|
49 |
logging.debug('REACT: project "' + proj + '" exists as project with _id:' + valid._id)
|
50 |
try:
|
50 |
try:
|
51 |
c.project = Project.m.get(_id=valid._id)
|
51 |
c.project = Project.query.get(_id=valid._id)
|
52 |
except:
|
52 |
except:
|
53 |
logging.debug('REACT: cannot initialize valid project')
|
53 |
logging.debug('REACT: cannot initialize valid project')
|
54 |
else:
|
54 |
else:
|
55 |
logging.debug('REACT: retrieved valid project with mount point:' + appmount)
|
55 |
logging.debug('REACT: retrieved valid project with mount point:' + appmount)
|
56 |
try:
|
56 |
try:
|