Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 817304 - YumOutput() in output.py has no attribute 'ts'
YumOutput() in output.py has no attribute 'ts'
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
16
All All
unspecified Severity low
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-28 15:35 EDT by Tom Shield
Modified: 2014-01-21 18:21 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-01 08:41:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
list_info.py yum plug in (846 bytes, text/plain)
2012-04-30 20:56 EDT, Tom Shield
no flags Details

  None (edit)
Description Tom Shield 2012-04-28 15:35:19 EDT
Description of problem:

my plugin for yum that calls YumOutput() in output.py dies with the following error:

  File "/usr/share/yum-cli/output.py", line 924, in listPkgs
    kern_pkgtup = yum.misc.get_running_kernel_pkgtup(self.ts)
AttributeError: YumOutput instance has no attribute 'ts'

it does not appear that any other part of yum calls this function.

Version-Release number of selected component (if applicable):

this is new to version 3.4.3-23.  I don't have this problem with 3.4.3-7


How reproducible:

every time

Steps to Reproduce:
1. run plugin that calls YumOutput()
2.
3.
  
Actual results:

full error message output is:

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 321, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 229, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 547, in doTransaction
    problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2180, in downloadPkgs
    self.plugins.run('predownload', pkglist=pkglist)
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 187, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/list_info.py", line 15, in predownload_hook
    out.listPkgs(ypl,'',outputType='info')
  File "/usr/share/yum-cli/output.py", line 924, in listPkgs
    kern_pkgtup = yum.misc.get_running_kernel_pkgtup(self.ts)
AttributeError: YumOutput instance has no attribute 'ts'


Expected results:

(program does not die with these errors)

Additional info:

replacing line 924 in output.py with

kern_pkgtup = ''

seems to solve the problem.  kern_pkgtup is not in the previous version at all nor is it in the 3.4.3 yum tarball from the yum home page.
Comment 1 James Antill 2012-04-30 15:03:59 EDT
Something is a bit weird, what is your plugin doing?

That line is in listPkgs() which is called via "yum list" ... does that command work for you?
Comment 2 Tom Shield 2012-04-30 20:56:39 EDT
Created attachment 581296 [details]
list_info.py yum plug in

Here is my plug in that triggers the problem.  I have

enable_list_info = True

in /etc/yum.conf to enable it.
Comment 3 Tom Shield 2012-04-30 20:57:48 EDT
And, yes, "list yum" does work for me.  So it's an interaction with my plugin.

Thanks, Tom.
Comment 4 James Antill 2012-05-01 08:41:38 EDT
 Yeh, so don't do this:

       out = YumOutput()
       out.listPkgs(ypl,'',outputType='info')
       raise PluginYumExit('end of download info on packages')

...the quickest fix is probably:

       out = conduit._base
       out.listPkgs(ypl,'',outputType='info')
       raise PluginYumExit('end of download info on packages')

Note You need to log in before you can comment on or make changes to this bug.