Merge branch 'master' of ssh://git.onelab.eu/git/myslice
[myslice.git] / manifold / manifoldapi.py
index eea606e..180807b 100644 (file)
@@ -72,8 +72,8 @@ class ManifoldAPI:
                     print "====> ManifoldAPI.%s"%repr(),"url",self.url
                     # No password in the logs
                     logAuth = copy.copy(self.auth)
-                    if 'AuthString' in logAuth:
-                        logAuth['AuthString']="XXX"
+                    for obfuscate in ['Authring','session']: 
+                        if obfuscate in logAuth:  logAuth[obfuscate]="XXX"
                     print "=> auth",logAuth
                     print "=> args",args,"kwds",kwds
                 annotations = {
@@ -113,6 +113,8 @@ def _execute_query(request, query, manifold_api_session_auth):
     print "-"*80
     result = manifold_api.forward(query.to_dict())
     if result['code'] == 2:
+        # XXX only if we know it is the issue
+        del request.session['manifold']
         raise Exception, 'Error running query: %r' % result
     
     if result['code'] == 1: