Commit de3ff6c6 authored by Rui Matos's avatar Rui Matos

Avoid GSettings aborting when missing classic overrides schema

We must go through our GSettingsSetting class instead of directly
creating a GSettings instance otherwise if the classic overrides
schema isn't installed, GSettings will abort us.

https://bugzilla.gnome.org/show_bug.cgi?id=754132
parent a93f7408
......@@ -140,9 +140,13 @@ def adjust_schema_for_overrides(originalSchema, key, options):
overridesSchema = "org.gnome.shell.overrides"
overridesFile = "org.gnome.shell.gschema.xml"
if (key in Gio.Settings(schema=overridesSchema).list_keys()):
options['schema_filename'] = overridesFile
return overridesSchema
try:
if (key in GSettingsSetting(overridesSchema, schema_filename=overridesFile).list_keys()):
options['schema_filename'] = overridesFile
return overridesSchema
except GSettingsMissingError, e:
logging.info("GSetting missing %s" % (e.message))
return originalSchema
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment