install

installer
Log | Files | Refs | README | LICENSE | git clone https://git.ne02ptzero.me/git/install

commit 3ec9fff7d57ad176253f02cb2e6dba322bafc866
parent 2b1741bcecb9719631e76d25790e8e77891a94f4
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Fri,  2 Dec 2016 18:43:15 +0100

Fix(Archives download): Will not download the same archive twice

Diffstat:
Mscreens/install/install.py | 20+++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/screens/install/install.py b/screens/install/install.py @@ -354,15 +354,17 @@ class Install: for conf in lst: dl_ok = 0 i = 0 - # Test multiples urls in case one fail - # TODO: Handle exception from retrieving - while dl_ok == 0: - # Update the progress bar - self.dlg.gauge_update(int((to_dl * 100) / dl_len), - "Getting "+ conf["archive"]+ "... ("+ str(to_dl) +"/"+ str(dl_len) +")", True) - urlretrieve(conf["urls"][i], self.arch_dir + conf["archive"]) - i += 1 - dl_ok = 1 + if os.path.isfile(self.arch_dir + conf["archive"] == False): + # Test multiples urls in case one fail + # TODO: Handle exception from retrieving + while dl_ok == 0: + # Update the progress bar + self.dlg.gauge_update(int((to_dl * 100) / dl_len), + "Getting "+ conf["archive"]+ "... ("+ str(to_dl) +"/"+ + str(dl_len) +")", True) + urlretrieve(conf["urls"][i], self.arch_dir + conf["archive"]) + i += 1 + dl_ok = 1 to_dl += 1 # Stop the progress bar self.dlg.gauge_stop()