For example:
>>> import yum
>>> y = yum.YumBase()
>>> x = {'release': '11.el7', 'epoch': '', 'version': '3.10', 'arch': 'x86_64', 'name': 'PyYAML'}
>>> y.install(**x)
Package PyYAML-3.10-11.el7.x86_64 is obsoleted by python2-pyyaml-5.1.2-1.0.1.el7.x86_64 which is already installed
[]
What's returned here is the empty list. Is there a clean way to assign the standard yum message to a variable?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…