add missing commands

This commit is contained in:
JerryXiao 2019-09-08 18:33:02 +08:00
parent 091b697967
commit 1ef1c3a066
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -511,14 +511,10 @@ updmgr = updateManager()
def info(retf='human'):
if retf == 'pkgconfigs':
ret = jobsmgr.pkgconfigs
elif retf == 'jobsmgr':
ret = jobsmgr
else:
# retf = 'human'
ret = str(jobsmgr)
def info(human=False):
ret = ""
if human is False:
ret += str(jobsmgr)
ret += '\nhuman-readable:\n'
ret += "".join([f"{k} = {jobsmgr.jobs[k]}\n" for k in jobsmgr.jobs])
ret += f"idle: {jobsmgr.idle}"
@ -558,7 +554,10 @@ def extras(action, pkgname=None):
return extra_readmainlog(debug=True)
elif action == "readpkglog":
pkgname = str(pkgname)
return extra_readpkglog(pkgname)
return extra_readpkglog(pkgname, update=False)
elif action == "readpkgupdlog":
pkgname = str(pkgname)
return extra_readpkglog(pkgname, update=True)
return False
def run(funcname, args=list(), kwargs=dict()):