From fec053eb921c71b6e82ba4302577fa99987cb9fb Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 11 Dec 2016 17:57:31 +0100 Subject: [PATCH] Catch AttributeError in cpu_count() Running ```Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32``` on Windows 10 64 Bit Noticed this issue while running ```tox``` with ```pytest tornado 0.4.5``` and ```tornado 4.4.2```. --- tornado/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tornado/process.py b/tornado/process.py index df61eba67..7c876494c 100644 --- a/tornado/process.py +++ b/tornado/process.py @@ -67,7 +67,7 @@ def cpu_count(): pass try: return os.sysconf("SC_NPROCESSORS_CONF") - except ValueError: + except (AttributeError, ValueError): pass gen_log.error("Could not detect number of processors; assuming 1") return 1 -- 2.47.2