Bug 808241 - TypeError: bad operand type for unary -: 'str'
Summary: TypeError: bad operand type for unary -: 'str'
Keywords:
Status: CLOSED DUPLICATE of bug 808130
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-presto
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-29 22:10 UTC by John Reiser
Modified: 2012-03-30 03:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-30 03:12:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Reiser 2012-03-29 22:10:52 UTC
Description of problem: "yum update" hangs with traceback because of a TYPO SYNTAX error.


Version-Release number of selected component (if applicable):
yum-presto-0.7.2-1.fc17.noarch


How reproducible:


Steps to Reproduce:
1. yum update
2.
3.
  
Actual results:
Setting up and reading Presto delta metadata
updates-testing/prestodelta                                     | 626 kB     00:01     
Processing delta metadata
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 2147, 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/presto.py", line 633, in predownload_hook
    (problems, more) = downloadPkgs(conduit, pinfo, download_pkgs)
  File "/usr/lib/yum-plugins/presto.py", line 321, in downloadPkgs
    delta = getDelta(po, presto, conduit, conf_mp)
  File "/usr/lib/yum-plugins/presto.py", line 198, in getDelta
    conduit.info(5, -("Could not find delta rpm for package %s.%s.")
TypeError: bad operand type for unary -: 'str'


Expected results: no complaint


Additional info:  Fix is the underscore in "_(\"Could" instead of a minus '-'.
-----/usr/lib/yum-plugins/presto.py line 197
    if not deltainfo.has_key(nevra):
        conduit.info(5, _("Could not find delta rpm for package %s.%s.")
                         % (po.name, po.arch))
-----

Comment 1 Jonathan Dieter 2012-03-30 03:12:05 UTC

*** This bug has been marked as a duplicate of bug 808130 ***


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