[MERGE] forward port of branch saas-1 up to revid 4887 chs@openerp.com-20130612153934-qyp6pb3bc4za4taf

bzr revid: chs@openerp.com-20130613172414-dln3g4j0ykcwaa02
bzr revid: chs@openerp.com-20130613173900-xl7rh321nnw2b04b
This commit is contained in:
Christophe Simonis
2013-06-13 19:39:00 +02:00
254 changed files with 948 additions and 667 deletions
+7 -3
View File
@@ -537,9 +537,13 @@ class DisableCacheMiddleware(object):
def session_path():
try:
username = getpass.getuser()
except Exception:
username = "unknown"
import pwd
username = pwd.getpwuid(os.geteuid()).pw_name
except ImportError:
try:
username = getpass.getuser()
except Exception:
username = "unknown"
path = os.path.join(tempfile.gettempdir(), "oe-sessions-" + username)
try:
os.mkdir(path, 0700)