Skip to content

Commit

Permalink
Merge pull request tornadoweb#1911 from medariox/patch-1
Browse files Browse the repository at this point in the history
Catch AttributeError in cpu_count()
  • Loading branch information
bdarnell authored Dec 13, 2016
2 parents d258c17 + fec053e commit 3e2856b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tornado/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e2856b

Please sign in to comment.