py3: use real division operator

"/" operator using integers as both left-hand and right-hand
expressions returns floor division in python2 and real
division in python3.

Use "//" instead to do real division for both python versions.

Story: 2006796
Task: 42783

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: Idcd62c4da223b316221ed9fff03bd14f0e3cba39
This commit is contained in:
Charles Short 2021-06-29 11:47:50 -04:00
parent 0f628be4cb
commit a1c63fc8ba
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class LogMgmtDaemon():
def get_percent_free(self):
usage = os.statvfs('/var/log')
return ((usage.f_bavail * 100) / usage.f_blocks)
return ((usage.f_bavail * 100) // usage.f_blocks)
def get_monitored_files(self):
self.monitored_files = []