HomeFreeBSD

arcstat: Fix integer division with python3

Description

arcstat: Fix integer division with python3

The arcstat script requests compatibility with python2 and python3, but
PEP 238 modified the / operator and results in erroneous output when
run under python3.

This commit replaces instances of / with //, yielding the expected
result in both versions of Python.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Valmiky Arquissandas <foss@kayvlim.com>
Closes #12603

Details

Provenance
Valmiky Arquissandas <kayvlim@gmail.com>Authored on Oct 8 2021, 3:32 PM
GitHub <noreply@github.com>Committed on Oct 8 2021, 3:32 PM
Parents
rG514498fef697: Simplify and document OpenZFS library dependencies
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG2d02bba23d83: arcstat: Fix integer division with python3 (authored by Valmiky Arquissandas <kayvlim@gmail.com>).Oct 8 2021, 3:32 PM