From e8e8eaaed5c786006c3287f8111f8be7e56259c0 Mon Sep 17 00:00:00 2001 From: Spiros Georgaras Date: Sat, 24 Feb 2024 13:26:29 +0200 Subject: [PATCH] - version 0.9.2.25 - droping python 2 - PyRadio will only run on python 3 - fixing #228 --- pyradio/install.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pyradio/install.py b/pyradio/install.py index f158ca0..b7c4c44 100644 --- a/pyradio/install.py +++ b/pyradio/install.py @@ -653,7 +653,6 @@ class PythonExecutable(object): def __init__( self, - requested_python_version, terminate_if_not_found=False): ''' Parameters ========== @@ -664,18 +663,16 @@ def __init__( If True, the program will terminate if python is not found (default is False) ''' - self.requested_python_version = requested_python_version self._terminate_if_not_found = terminate_if_not_found if not platform.system().lower().startswith('win'): self._check_if_is_debian_based() self._get_pythons() def __str__(self): - return 'Is Debian: {0}\nPython: {1}, {2}\nRequested version: {3}'.format( + return 'Is Debian: {0}\nPython: {1}, {2}'.format( self.is_debian, self._python[0], self._python[1], - self.requested_python_version ) @property @@ -1157,7 +1154,10 @@ def _prompt_sudo(self): def _download_file(self, url, filename): print(' url: "{}"'.format(url)) print(' filename: "{}"'.format(filename)) - if os.path.exists(filename): + if os.path.exists(filename) and not ( + filename.endswith('-master.zip') or \ + filename.endswith('-devel.zip') + ): print(' [magenta]** file found in cache![/magenta]') else: try: @@ -1397,7 +1397,6 @@ def _do_it(self, mode='update'): VERSION = PyRadioInstallPyReleaseVersion if args.uninstall: - self._get_cache = False if platform.system().lower().startswith('win'): ''' ok, create BAT file on Windows''' uni = PyRadioUpdateOnWindows(package=package)