show visual message for OSError from importing vineyard in vineyard-preferences

Bug #716413 reported by Krzysztof Sikorski
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vineyard
Fix Released
Medium
Unassigned

Bug Description

This is more a feature request than a bug report.

When the ~/.wine directory is missing, importing vineyard module fails with rather obvious OSError:

Traceback (most recent call last):
  File "/usr/bin/vineyard-preferences", line 26, in <module>
    import vineyard
  File "/usr/lib/pymodules/python2.6/vineyard/__init__.py", line 9, in <module>
    from common import *
  File "/usr/lib/pymodules/python2.6/vineyard/common.py", line 146, in <module>
    import wine
  File "/usr/lib/pymodules/python2.6/wine/__init__.py", line 62, in <module>
    prefixes.use(prefixes.get_name(common.ENV['WINEPREFIX']))
  File "/usr/lib/pymodules/python2.6/wine/prefixes.py", line 162, in use
    drives.auto_mount_images()
  File "/usr/lib/pymodules/python2.6/wine/drives.py", line 154, in auto_mount_images
    for drive in os.listdir('%s/dosdevices' % common.ENV['WINEPREFIX']):
OSError: [Errno 2] No such file or directory: '/home/rad/.wine/dosdevices'

I suppose this is desired behaviour, but this error is not caught in vineyard-preferences which makes it fail silently on start with no visual clue to the user, only a traceback in the console. Maybe a message box with short info (f.ex. "you should run winecfg first") would be better?

Revision history for this message
Christian Dannie Storgaard (cybolic) wrote :

Actually no, it's not desired behaviour, so thanks for reporting it.

python-wine will now create the ~/.wine directory and configuration if it's missing.

Changed in vineyard:
status: New → Fix Committed
importance: Undecided → Medium
Changed in vineyard:
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.