+ # the new API would expect Get('local:user') instead
+ persons_result = api.forward(Query.get('local:user').to_dict())
+ persons = persons_result.ok_value()
+ if not persons:
+ print "GetPersons failed",persons_result.error()
+ return
+ person = persons[0]
+ print "PERSON=", person
+
+ request.session['manifold'] = {'auth': api.auth, 'person': person, 'expires': session['expires']}
+ except ManifoldException, e:
+ print "Caught ManifoldException, returning corresponding ManifoldResult"
+ return e.manifold_result
+ except Exception, e:
+ print "E: manifoldbackend", e
+ import traceback
+ traceback.print_exc()