usb-imagewriter fails on .img filename including parentheses

Bug #400522 reported by fewyun
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usb-imagewriter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: usb-imagewriter

The imagewriter gui would hang every time that I tried to write a file called ubuntu-9.04-netbook-remix-i386(3).img, but succeeded when I renamed that file to ubuntu-9.04-netbook-remix-i386.img. So, the (3) seems to be causing a parsing issue, specifically:

fewyun@home:~$ sudo imagewriter
0
Traceback (most recent call last):
  File "/usr/lib/imagewriter/imagewriter.py", line 112, in do_write
    self.raw_write(source, target)
  File "/usr/lib/imagewriter/imagewriter.py", line 150, in raw_write
    src_size = float(data.stdout.readline().split()[4])*1.0
IndexError: list index out of range

This seems related to the following bug for filenames with spaces [ https://bugs.launchpad.net/ubuntu/+source/usb-imagewriter/+bug/366607 ] for which a fix has already been released. Maybe the filename parsing needs a full overhaul..

This was tested on a fully updated ubuntu 9.04 install.

Revision history for this message
Olivers De Abreu (oliversd) wrote :

This also happen to me with an .img file called moblin-netbook-beta-refresh-20090802-001(2).img and others .img files with parentheses.

1
Traceback (most recent call last):
  File "/usr/lib/imagewriter/imagewriter.py", line 112, in do_write
    self.raw_write(source, target)
  File "/usr/lib/imagewriter/imagewriter.py", line 150, in raw_write
    src_size = float(data.stdout.readline().split()[4])*1.0
IndexError: list index out of range
Image: /home/wako/Documents/Downloads/moblin-netbook-beta-refresh-20090802-001(2).img
Target Device: Unknown Unknown (/dev/sdb)

Package: usb-imagewriter
State: installed
Automatically installed: no
Version: 0.1.3-0ubuntu1
Priority: optional
Section: universe/misc
Maintainer: Oliver Grawert <email address hidden>
Uncompressed Size: 160k
Depends: coreutils (>= 6.10-3), procps, python-gnome2, gksu, python, hal
Description: tool to write .img files to USB Keys
 A GUI to write .img files like the ones created by the ubuntu-mobile team for
 UME to a USB Key for installing the image to mobile devices and netbooks.

Changed in usb-imagewriter (Ubuntu):
status: New → Confirmed
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.