rework division handling
Python 3 changed the / operator to return a float all the time.
Change to using // in cases where we want integer division, and
import future division in modules where we want float behavior.
We don't enforce the future division import all the time since
pylint will enforce those two states all the time.
BUG=chromium:980619
TEST=lint is unchanged in chromite
TEST=unittests pass
Change-Id: Iae007d3dc868746f755eba30ab0923e4f4502eae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1768871
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/deploy_chrome.py b/scripts/deploy_chrome.py
index 39aa830..5049c59 100644
--- a/scripts/deploy_chrome.py
+++ b/scripts/deploy_chrome.py
@@ -248,7 +248,7 @@
if effective_free < staging_size:
raise DeployFailure(
'Not enough free space on the device. Required: %s MiB, '
- 'actual: %s MiB.' % (staging_size / 1024, effective_free / 1024))
+ 'actual: %s MiB.' % (staging_size // 1024, effective_free // 1024))
if device_info.target_fs_free < (100 * 1024):
logging.warning('The device has less than 100MB free. deploy_chrome may '
'hang during the transfer.')