Smarter mime_types parsing logic. Works also if there

are spaces between types.
This commit is contained in:
Marco Pesenti Gritti 2007-10-31 14:58:37 +01:00
parent 6278f8207e
commit 1a3d520dce
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@ -1,3 +1,4 @@
* #4552 Allow to open images in Paint (marco)
* #4518: Encode nickname in UTF-8 when writing it out to .sugar/*/config (smcv) * #4518: Encode nickname in UTF-8 when writing it out to .sugar/*/config (smcv)
* sugar-control: Use NM for radio on/off, check for superuser (erikos) * sugar-control: Use NM for radio on/off, check for superuser (erikos)

View File

@ -93,8 +93,8 @@ class ActivityBundle(Bundle):
self._path) self._path)
if cp.has_option(section, 'mime_types'): if cp.has_option(section, 'mime_types'):
mime_list = cp.get(section, 'mime_types') mime_list = cp.get(section, 'mime_types').strip(';')
self._mime_types = mime_list.strip(';').split(';') self._mime_types = [ mime.strip() for mime in mime_list.split(';') ]
if cp.has_option(section, 'show_launcher'): if cp.has_option(section, 'show_launcher'):
if cp.get(section, 'show_launcher') == 'no': if cp.get(section, 'show_launcher') == 'no':