Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Threading.thread (needs to call start() that then will call run() in …
Browse files Browse the repository at this point in the history
…a new thread)
  • Loading branch information
karasu committed Oct 6, 2018
1 parent ae6fc2a commit 488449a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/download/download_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion update.info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"version":"0.16.20","files":[
{"version":"0.16.21","files":[
]}

0 comments on commit 488449a

Please sign in to comment.