Skip to content

Commit

Permalink
bug 1512499 - handle psutil returning None for physical_cores. r=froydnj
Browse files Browse the repository at this point in the history
psutil has a bug on arm systems where it will return None for physical_cores:
giampaolo/psutil#1359

This causes us to generate invalid telemetry data which raises an error. Fix
this by simply omitting the field in this case.

Differential Revision: https://phabricator.services.mozilla.com/D14969

UltraBlame original commit: be66f8877e465637de546fd3a94a55009e74f973
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent 47a5bf2 commit b867d83
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions python/mozbuild/mozbuild/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1492,12 +1492,7 @@
(
)

info
[
'
physical_cores
'
]
=
psutil
.
Expand All @@ -1508,6 +1503,22 @@
False
)

if
physical_cores
is
not
None
:

info
[
'
physical_cores
'
]
=
physical_cores

#
total
on
Expand Down

0 comments on commit b867d83

Please sign in to comment.