diff options
| author | Olivier Dony <odo@openerp.com> | 2017-02-15 23:55:54 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-05-05 17:02:45 +0200 |
| commit | 5a15d97387372bc1432f6cdc476215d16ce0f409 (patch) | |
| tree | 0aac76cb47182994992233b74bdf828e69cde06e /odoo/tools/cache.py | |
| parent | 8fbbe04a50370f7da775688ccfc12e4779ef4a00 (diff) | |
[FIX] tools.cache: fix stats dump with gevent
Gevent processes have pseudo-thread objects
that do no always have a `dbname`attribute.
This could crash the process upon receiving
a USR1 signal.
Diffstat (limited to 'odoo/tools/cache.py')
| -rw-r--r-- | odoo/tools/cache.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/tools/cache.py b/odoo/tools/cache.py index ac776eefa74..0da1828c7a0 100644 --- a/odoo/tools/cache.py +++ b/odoo/tools/cache.py @@ -200,7 +200,7 @@ def log_ormcache_stats(sig=None, frame=None): import threading me = threading.currentThread() - me_dbname = me.dbname + me_dbname = getattr(me, 'dbname', 'n/a') entries = defaultdict(int) for dbname, reg in Registry.registries.iteritems(): for key in reg.cache.iterkeys(): |
