command-not-found crashes when /usr/share/command-not-found/programs.d is not a directory

Bug #513433 reported by tsarek
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
command-not-found
Fix Released
Low
Zygmunt Krynicki
command-not-found (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: command-not-found

mint@mint /media $ htop
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/ubuntu/+source/command-not-found
Please include the following information with the report:

command-not-found version: 0.2.21
Python version: 2.6.4 candidate 2
Distributor ID: LinuxMint
Description: Linux Mint 8 Helena - Main Edition
Release: 8
Codename: helena
Exception information:

[Errno 20] Not a directory: '/usr/share/command-not-found/programs.d'
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/CommandNotFound/util.py", line 43, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 24, in main
    cnf = CommandNotFound(options.data_dir)
  File "/usr/lib/python2.6/dist-packages/CommandNotFound/CommandNotFound.py", line 88, in __init__
    for filename in os.listdir(os.path.sep.join([data_dir, self.programs_dir])):
OSError: [Errno 20] Not a directory: '/usr/share/command-not-found/programs.d'

Revision history for this message
tsarek (retryret) wrote :

crashed on live-cd linux-mint-8-main

Zygmunt Krynicki (zyga)
Changed in command-not-found:
status: New → Confirmed
importance: Undecided → Low
milestone: none → 0.2.41
assignee: nobody → Zygmunt Krynicki (zkrynicki)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

current trunk has this issue fixed, there is more checking for exceptions when touching the file system

Changed in command-not-found:
status: Confirmed → Fix Committed
summary: - command-not-found has crashed
+ command-not-found crashes when /usr/share/command-not-found/programs.d
+ is not a directory
Zygmunt Krynicki (zyga)
Changed in command-not-found:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in command-not-found (Ubuntu):
status: New → Confirmed
selva (selvam141)
Changed in command-not-found (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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