update-notifier-kde hangs due to missing check of presence of options

Bug #477941 reported by juulpasgaard
This bug report is a duplicate of:  Bug #472518: Update notification never appears. Edit Remove
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Triaged
Medium
Unassigned
Nominated for Karmic by Montblanc

Bug Description

Binary package hint: update-notifier

update-notifier-kde 0.90 in Kubuntu 9.10 Karmic has the following lines in the run(options=None) function:

   # we are run in "are security updates installed automatically?"
    # question mode
    if options.security_updates_unattended:
        res = apt_pkg.Config.FindI("APT::Periodic::Unattended-Upgrade", 0)
        #print res
        sys.exit(res)

Unfortunately, run() is called from update-notifier-kde without arguments, and options is therefore None. Update-notifier-kde therefore hangs with the following output:

Traceback (most recent call last):
  File "/usr/bin/update-notifier-kde", line 168, in aptDirectoryChanged
    result = apt_check.run()
  File "/usr/lib/update-notifier/apt_check.py", line 84, in run
    if options.security_updates_unattended:
AttributeError: 'NoneType' object has no attribute 'security_updates_unattended'

Suggested fix: Change the above code to
    if options and options.security_updates_unattended:
        res = apt_pkg.Config.FindI("APT::Periodic::Unattended-Upgrade", 0)
        #print res
        sys.exit(res)

ProblemType: Bug
Architecture: i386
Date: Sun Nov 8 01:05:51 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: update-notifier-common 0.90
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_DK.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: update-notifier
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
juulpasgaard (bjuulpas) wrote :
Changed in update-notifier (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
juulpasgaard (bjuulpas) wrote :

Additional comments:

I was trying to understand why (after a crash in update-notifier-kde, which I - sadly - did not capture any traces of), I could not get the desktop to shutdown og log off, when I came across the problem reported above. I had to do a manual "sudo shutdown -h now". After applying the above fix, log off and shutdown worked again. This made me describe "update-notifier-kde" as hanging.

However, I now remember that I had also fixed some configuration problems in the Akonadi server and Nepomuk. Basically, Nepomuk was not started for some unknown reason, but disabling and reenabling it made it work again. Also, the Akonadi server had problems with the mysql configuration - because I had copied the configuration from another computer under a different login name. Manually changing the configuration made it work again.

Perhaps such changes could also explain why logoff and shutdown from the desktop now works again? I'm not sure.

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.