Skip to content

Commit

Permalink
Merge branch 'mr/cardao/fix-mypy-error' into 'master'
Browse files Browse the repository at this point in the history
e3.os.platform: Fix mypy error

Closes #25

See merge request it/e3-core!61
  • Loading branch information
leocardao committed Nov 5, 2024
2 parents 107bd5a + f9ea3f3 commit dabc72e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/e3/os/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ def fetch_system_data(cls) -> None:
try:
import psutil

cls.core_number = psutil.cpu_count()
tmp_core_number = psutil.cpu_count()
if not tmp_core_number:
logger.error("psutil.cpu_count() returned None or 0")
else:
cls.core_number = tmp_core_number
except Exception:
logger.exception("psutil error")

Expand Down

0 comments on commit dabc72e

Please sign in to comment.