mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 01:44:15 +02:00
[fix][core] random internet available key error
This commit is contained in:
@@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- UI:
|
- UI:
|
||||||
- not verifying if an icon path is a file
|
- not verifying if an icon path is a file
|
||||||
- minor fixes
|
- minor fixes
|
||||||
|
- minor bug fixes
|
||||||
|
|
||||||
### UI
|
### UI
|
||||||
- Default **Type** icon removed from the Type filter to make the design more consistent with the Category filter.
|
- Default **Type** icon removed from the Type filter to make the design more consistent with the Category filter.
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ class GenericSoftwareManager(SoftwareManager):
|
|||||||
|
|
||||||
disk_loader = None
|
disk_loader = None
|
||||||
|
|
||||||
|
internet_available = None
|
||||||
if not pkg_types: # any type
|
if not pkg_types: # any type
|
||||||
for man in self.managers:
|
for man in self.managers:
|
||||||
if self._can_work(man):
|
if self._can_work(man):
|
||||||
@@ -164,11 +165,12 @@ class GenericSoftwareManager(SoftwareManager):
|
|||||||
disk_loader = self.disk_loader_factory.new()
|
disk_loader = self.disk_loader_factory.new()
|
||||||
disk_loader.start()
|
disk_loader.start()
|
||||||
|
|
||||||
if thread_internet_check.isAlive():
|
if internet_available is None:
|
||||||
thread_internet_check.join()
|
thread_internet_check.join()
|
||||||
|
internet_available = net_check.get('available', True)
|
||||||
|
|
||||||
mti = time.time()
|
mti = time.time()
|
||||||
man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=net_check['available'])
|
man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=internet_available)
|
||||||
mtf = time.time()
|
mtf = time.time()
|
||||||
self.logger.info(man.__class__.__name__ + " took {0:.2f} seconds".format(mtf - mti))
|
self.logger.info(man.__class__.__name__ + " took {0:.2f} seconds".format(mtf - mti))
|
||||||
|
|
||||||
@@ -185,9 +187,12 @@ class GenericSoftwareManager(SoftwareManager):
|
|||||||
disk_loader = self.disk_loader_factory.new()
|
disk_loader = self.disk_loader_factory.new()
|
||||||
disk_loader.start()
|
disk_loader.start()
|
||||||
|
|
||||||
thread_internet_check.join()
|
if internet_available is None:
|
||||||
|
thread_internet_check.join()
|
||||||
|
internet_available = net_check.get('available', True)
|
||||||
|
|
||||||
mti = time.time()
|
mti = time.time()
|
||||||
man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=net_check['available'])
|
man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=internet_available)
|
||||||
mtf = time.time()
|
mtf = time.time()
|
||||||
self.logger.info(man.__class__.__name__ + " took {0:.2f} seconds".format(mtf - mti))
|
self.logger.info(man.__class__.__name__ + " took {0:.2f} seconds".format(mtf - mti))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user