Error in get_changelog

Bug #59940 reported by Denis Washington
2
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: update-manager

With edgy, I always experienced the problem that update-manager wasn't able to download the changelogs of the packages. Today I finally got myself to look at the problem. I looked at the console output and found this:

  File "/usr/lib/python2.4/site-packages/UpdateManager/UpdateManager.py", line 162, in get_changelog
    l = string.split(srcver,":")
UnboundLocalError: local variable 'srcver' referenced before assignment

I looked at the code and found the mistake in a code block that was supposed to get the source version of the package and compare it to the binary version. All code paths should actually assign some value to srcver because it is used afterwards, but one was forgotten: on line 142, there is:

if srcrec:
    srcver = ...

The problem: there is no "else" clause. The code should become

if srcrec:
    srcver = ...
else:
    srcver = binver # the fallback used in the rest of the code

After this change, the changelog downloading worked without any problems on my machine. Could this be patched upstream?

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I fixed this in my local repository and it will be part of the next upload.

Changed in update-manager:
assignee: nobody → mvo
importance: Untriaged → Medium
status: Unconfirmed → Fix Committed
Michael Vogt (mvo)
Changed in update-manager:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.