From: funilrys Date: Thu, 26 Jul 2018 19:59:18 +0000 (+0200) Subject: Introduction of an exception saying that we do not support Python 2 anymore. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=943d0d732dfe5fa7c9b6f40ecca8c97d112d00b3;p=stevenblack-hosts.git Introduction of an exception saying that we do not support Python 2 anymore. This patch is the begining of https://github.com/StevenBlack/hosts/issues/729 --- diff --git a/updateHostsFile.py b/updateHostsFile.py index e9a10187c..c44a89796 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -33,8 +33,7 @@ if PY3: from urllib.request import urlopen raw_input = input else: # Python 2 - from urllib2 import urlopen - raw_input = raw_input # noqa + raise Exception('We do not support Python 2 anymore.') # Syntactic sugar for "sudo" command in UNIX / Linux if platform.system() == "OpenBSD":