File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,22 +269,21 @@ def __str__(self):
269269 return "\n " .join (prefs_entries )
270270
271271
272+ force_ini = os .path .exists (
273+ os .path .join (glib .get_user_config_dir (), 'meld' , 'use-rc-prefs' ))
274+ skip_gconf = sys .platform == 'win32' or force_ini
272275# Prefer gconf, falling back to configparser
273- Preferences = None
274-
275- if sys .platform != 'win32' and not os .path .exists (os .path .join (glib .get_user_config_dir (), 'meld' , 'use-rc-prefs' )):
276- try :
277- import gconf
278- # Verify that gconf is actually working (bgo#666136)
279- client = gconf .client_get_default ()
280- key = '/apps/meld/gconf-test'
281- client .set_int (key , os .getpid ())
282- client .unset (key )
283- Preferences = GConfPreferences
284- except (ImportError , glib .GError ):
285- pass
286-
287- if Preferences == None :
276+ try :
277+ if skip_gconf :
278+ raise ImportError
279+ import gconf
280+ # Verify that gconf is actually working (bgo#666136)
281+ client = gconf .client_get_default ()
282+ key = '/apps/meld/gconf-test'
283+ client .set_int (key , os .getpid ())
284+ client .unset (key )
285+ Preferences = GConfPreferences
286+ except (ImportError , glib .GError ):
288287 try :
289288 import configparser
290289 except ImportError :
You can’t perform that action at this time.
0 commit comments