From 488449ac33f00697b0f132da1ba913820afa7309 Mon Sep 17 00:00:00 2001 From: karasu Date: Sat, 6 Oct 2018 15:42:16 +0200 Subject: [PATCH] Threading.thread (needs to call start() that then will call run() in a new thread) --- src/download/download_requests.py | 8 ++++---- src/info.py | 2 +- update.info | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/download/download_requests.py b/src/download/download_requests.py index 257bbb2f6..2ae42784f 100644 --- a/src/download/download_requests.py +++ b/src/download/download_requests.py @@ -64,7 +64,7 @@ def __init__(self, origin, xz_cache_dirs): self.origin = origin self.xz_cache_dirs = xz_cache_dirs - def start(self): + def run(self): basename = os.path.basename(self.origin) for xz_cache_dir in self.xz_cache_dirs: # Avoid using the ISO itself @@ -193,8 +193,8 @@ def start(self, downloads): self.events.add('downloads_percent', str(downloads_percent)) # Wait until all xz packages are also copied to provided cache (if any) - for cache_thread in self.copy_to_cache_threads: - cache_thread.join() + for copy_to_cache_thread in self.copy_to_cache_threads: + copy_to_cache_thread.join() self.events.add('downloads_progress_bar', 'hide') return True @@ -226,8 +226,8 @@ def download_package(self, element, dst_path): if download_ok: # Copy downloaded xz file to the cache the user has provided, too. copy_to_cache_thread = CopyToCache(dst_path, self.xz_cache_dirs) - self.copy_to_cache_threads.append(copy_to_cache_thread) copy_to_cache_thread.start() + self.copy_to_cache_threads.append(copy_to_cache_thread) # Get out of the for loop, as we managed # to download the package diff --git a/src/info.py b/src/info.py index fb334699e..359d2fad8 100755 --- a/src/info.py +++ b/src/info.py @@ -29,7 +29,7 @@ """ Set some Cnchi global constants """ -CNCHI_VERSION = "0.16.20" +CNCHI_VERSION = "0.16.21" """ Cnchi version """ CNCHI_WEBSITE = "http://www.antergos.com" diff --git a/update.info b/update.info index 1c593fc8e..5de114d2c 100644 --- a/update.info +++ b/update.info @@ -1,2 +1,2 @@ -{"version":"0.16.20","files":[ +{"version":"0.16.21","files":[ ]}