system-config-kickstart: Traceback on opening a nonexistent file

Bug #409554 reported by Brent Fox on 2009-08-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
system-config-kickstart (Ubuntu)
Colin Watson

Bug Description

Binary package hint: system-config-kickstart

Description: Ubuntu karmic (development branch)
Release: 9.10

  Installed: 2.5.20-0ubuntu19
  Candidate: 2.5.20-0ubuntu19
  Version table:
 *** 2.5.20-0ubuntu19 0
        500 karmic/main Packages
        100 /var/lib/dpkg/status

Description: When trying to run system-config-kickstart from the command line with a bogus filename for a kickstart file, you get the following traceback:

Traceback (most recent call last):
  File "./", line 82, in <module>
  File "/home/bfox/packages/system-config-kickstart/karmic-orig/system-config-kickstart-2.5.20/src/", line 168, in __init__
    self.kickstartParser = kickstartParser.KickstartParser(self.kickstartData, file)
  File "/home/bfox/packages/system-config-kickstart/karmic-orig/system-config-kickstart-2.5.20/src/", line 71, in __init__
  File "/home/bfox/packages/system-config-kickstart/karmic-orig/system-config-kickstart-2.5.20/src/", line 74, in readKickstartFile
    self.lines = open(file, "r").readlines()
IOError: [Errno 2] No such file or directory: 'foo.cfg'

I am attaching a patch which should handle this situation more gracefully.

Colin Watson (cjwatson) wrote :

I tweaked this a bit to improve the message (the file name won't reliably be at the end of the sentence in all languages, and it would be good to print the error message too). Thanks.

Changed in system-config-kickstart (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-kickstart - 2.5.20-0ubuntu20

system-config-kickstart (2.5.20-0ubuntu20) karmic; urgency=low

  [ Brent Fox ]
  * Fix GtkSpinButton warnings (LP: #409261).
  * Hook up event handlers after calling (LP: #409270).
  * Print usage message on getopt errors (LP: #409352).
  * Add ext4 to supported filesystem types (LP: #409368).
  * Print a proper error if file opens fail (LP: #409554).

 -- Colin Watson <email address hidden> Tue, 11 Aug 2009 14:19:34 +0100

Changed in system-config-kickstart (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers