diff --git a/tools/android/build_incremental_dexmanifest.py b/tools/android/build_incremental_dexmanifest.py index 2832761a896db7..6f97c02f394f3d 100644 --- a/tools/android/build_incremental_dexmanifest.py +++ b/tools/android/build_incremental_dexmanifest.py @@ -32,7 +32,13 @@ import hashlib import os -from queue import Queue +# pylint: disable=g-import-not-at-top +try: + # python2 without compatibility package + from Queue import Queue +except ImportError: + # python3 + from queue import Queue import shutil import sys import tempfile