From 185a10f7c5a9f4f588c42d890aeb077383676005 Mon Sep 17 00:00:00 2001 From: Edward d'Auvergne Date: Mon, 18 Nov 2019 10:09:03 +0100 Subject: [PATCH] Catalogs: Python3 does not have a 'long' integer type. --- catalog/catalog.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/catalog/catalog.py b/catalog/catalog.py index 25931ec..283eb7e 100644 --- a/catalog/catalog.py +++ b/catalog/catalog.py @@ -17,6 +17,14 @@ CATALOG_VERSION = 4 quiet = False verbose = False +# The Python version. +PY_VERSION = sys.version_info[0] + +# Python 2 and 3 compatibility. +if PY_VERSION == 3: + long = int + + def warning(msg): if not quiet: print(msg)