refactoring: distro check for arch and snap gems

This commit is contained in:
Vinicius Moreira
2019-10-09 18:14:54 -03:00
parent dd56a515fb
commit 69dd9b9396
6 changed files with 22 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ class ApplicationContext:
def __init__(self, disk_cache: bool, download_icons: bool, http_client: HttpClient, app_root_dir: str, i18n: dict,
cache_factory: MemoryCacheFactory, disk_loader_factory: DiskCacheLoaderFactory,
logger: logging.Logger, file_downloader: FileDownloader):
logger: logging.Logger, file_downloader: FileDownloader, distro: str):
"""
:param disk_cache: if package data should be cached to disk
:param download_icons: if packages icons should be downloaded
@@ -22,7 +22,8 @@ class ApplicationContext:
:param cache_factory:
:param disk_loader_factory:
:param logger: a logger instance
:param file_downloader:
:param file_downloader
:param distro
"""
self.disk_cache = disk_cache
self.download_icons = download_icons
@@ -34,6 +35,7 @@ class ApplicationContext:
self.logger = logger
self.file_downloader = file_downloader
self.arch_x86_64 = sys.maxsize > 2**32
self.distro = distro
def is_system_x86_64(self):
return self.arch_x86_64