pushimage: migrate to python3 only
Now that cbuildbot is python3 only, we can migrate this module.
BUG=chromium:997354
TEST=`./run_tests` passes
Change-Id: I22b872dc9cdddfbc6fcc96b43d011246f78156c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2159926
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
diff --git a/scripts/pushimage_unittest.py b/scripts/pushimage_unittest.py
index 0f8fe64..e5e2919 100644
--- a/scripts/pushimage_unittest.py
+++ b/scripts/pushimage_unittest.py
@@ -9,6 +9,7 @@
import collections
import os
+import sys
import mock
@@ -22,6 +23,9 @@
from chromite.scripts import pushimage
+assert sys.version_info >= (3, 6), 'This module requires Python 3.6+'
+
+
# Use our local copy of insns for testing as the main one is not available in
# the public manifest. Even though _REL is a relative path, this works because
# os.join leaves absolute paths on the right hand side alone.