Print yb.patarches # these are the compatible architectures with our system. Print yb.nfig_file_path # obvious again, the file path for your yum's config file.įor more configuration options, you can always see like this dir(yb.conf)Īnd don’t forget this perfect module, to reverse engineer some function if you don’t know what arguments it gets and if it’s poorly documented (ex: it doesn’t have a valid _doc_ attribute) : import inspectĪnd about the arch method. Usually it is set to default 2, but since you'll be running in a script, after your script gets stable, its a good idea to set this to 0 and then distribute it. it's between 0-10 and 0 is only critical ones, while 10 is more like a debug feature. Print yb.conf.errorlevel # this is the level of errors you'd like to get as an output. when set to true, your yum commands will take action of is the -skip-broken parameters was given to the yum itself. Print yb.conf.skip_broken # usually false. Print yb.conf.logfile # this will obviously printout the logfile's pathįor i in yb.conf.reposdir : print i # and this will printout the directories and files for the repositories That’s why it looks like almost everybody’s trying to hack their way into this module, the yum module for Python.įirst of all don’t forget that this module is only available if you’re using a Red Hat branch of distribution (fedora, centos etc.) For other distributions, such as Debian, there are other api’s, such as apt itself.īelow you’ll find some basic ways of getting configuration settings of the current yum. ![]() ![]() ![]() Here’s something very basic yet poorly documented.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |