[Yum] HTTP/FTP Authentication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 29, 2003 at 07:11:47PM -0400, seth vidal wrote:
> in 2.x you could maybe grab __version__ from yummain - or find a way of
> setting it from there
> 
> or alternatively, push it into conf as  conf.version, or the reverse.
> 
> you get the idea.
> 
> I couldn't put version in the config stuff for the --version command b/c
> that part happens before the config exists - but certainly we could
> conf.version = __version__ after the conf has been setup.

OK, I feel a little silly.  I didn't know that was available at all.
I agree.  Probably the cleanest way to do it is to push it in from
yummain.  You could do that in two ways:

1) by importing urlgrabber from within yummain (making yummain depend
   on urlgrabber directly is no big deal because it already depends on
   it indirectly via clientStuff)

   # <within yummain.py>
   import urlgrabber
   __version__='2.0'
   urlgrabber.set_user_agent('Yum/%s' % __version__)

2) by going "through" clientStuff

   # <within yummain.py>
   __version__='2.0'
   clientStuff.urlgrabber.set_user_agent('Yum/%s' % __version__)

They're functionally identical.  It's just a matter of which is more
aesthetically appealing :)

					-Michael
-- 
  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner@xxxxxxxxxxxx
  Box 90305, Durham N.C. 27708-0305


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux