On 01/21/2013 03:49 PM, James Antill wrote:
On Sun, 2013-01-20 at 12:14 -0500, Keith Robertson wrote:
Hi,
I've been trying to write some code which uses the Yum API to download
some packages based on an example in[1]. I have written a very simple
<snip>
Eating all exceptions is generally a bad idea, but it depends on your
requirements.
ACK, I just want yum to be quiet.
2) Is there some initialization function I am neglecting to call or is
there a debug option I can use to squelch all output from yum (see
stacktrace in [3])?
Two things:
1. You need to loop on yb.repos.listEnabled() and set that
repos. .gpgcheck = False ... by the time yb.conf is setup all the repos.
are loaded and so changing yb.conf.gpgcheck doesn't do much (when
packages are downloaded they just look at pkg.repo.gpgcheck to see if
they should check).
As a hack (which the cli uses) you could also just set
yb._override_sigchecks=True.
I just found this and it works great. Thanks.
2. If you are just downloading call downloadPkgs() instead of
processTransaction().
I couldn't seem to get that working. I'm also noticing some oddball
errors caused by the 'atexit' handlers. Any thoughts on these [1]?
[1]
Exception AttributeError: "'NoneType' object has no attribute 'sqlite'"
in <bound method YumBase.__del__ of <yum.YumBase object at 0x29d3d10>>
ignored
Exception AttributeError: "'NoneType' object has no attribute 'sqlite'"
in <bound method RepoStorage.__del__ of <yum.repos.RepoStorage instance
at 0x2941f80>> ignored
_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel