small improvements

This commit is contained in:
JerryXiao 2019-04-11 17:06:25 +08:00
parent 551ea4c1be
commit 53165071c7
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -252,6 +252,7 @@ class jobsManager:
self._new_buildjob(newjob) self._new_buildjob(newjob)
else: else:
# This part does the job # This part does the job
self.idle = False
job = self.__get_job() job = self.__get_job()
if not job: if not job:
logging.error('No job got') logging.error('No job got')
@ -316,6 +317,7 @@ class updateManager:
def check_update(self, rebuild_package=None): def check_update(self, rebuild_package=None):
updates = list() updates = list()
for pkg in jobsmgr.pkgconfigs: for pkg in jobsmgr.pkgconfigs:
try:
if rebuild_package and \ if rebuild_package and \
rebuild_package != pkg.dirname: rebuild_package != pkg.dirname:
continue continue
@ -354,6 +356,8 @@ class updateManager:
updates.append((pkg, ver, buildarchs)) updates.append((pkg, ver, buildarchs))
else: else:
logger.warning(f'unknown package type: {pkg.type}') logger.warning(f'unknown package type: {pkg.type}')
except Exception:
print_exc_plus()
self._save() self._save()
return updates return updates