From fa4dddd15343614540ffbccaa2d6a3894f6eb579 Mon Sep 17 00:00:00 2001 From: nvanschoote Date: Fri, 12 Jul 2019 10:24:32 +0200 Subject: [PATCH] Enforce the use of python3 when running this script --- webapp_admin/webapp_admin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp_admin/webapp_admin.py b/webapp_admin/webapp_admin.py index aeb2d04..4ea14a4 100755 --- a/webapp_admin/webapp_admin.py +++ b/webapp_admin/webapp_admin.py @@ -2,15 +2,18 @@ # encoding: utf-8 from pkg_resources import parse_version import sys +if sys.version_info[0] < 3: + print('This tool works with Python3. Not Python 2') + sys.exit(1) try: import kopano except ImportError: - print('python-kopano should be installed on your system') + print('python3-kopano should be installed on your system') sys.exit(1) try: from MAPI.Util import * except ImportError: - print('python-mapi should be installed on your system') + print('python3-mapi should be installed on your system') sys.exit(1) import json import base64