summaryrefslogtreecommitdiff
path: root/mate-conf/mate-conf-import
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-04-07 12:30:15 +0200
committerStefano Karapetsas <[email protected]>2013-04-07 12:30:15 +0200
commitbbd33e26c62a26d038c1b0d6e1d05c1aa8b682a1 (patch)
tree4c6da41340f5e1984f2fd2d87ffb5cf2d49d5c49 /mate-conf/mate-conf-import
parenta3b34747e3f357eb0f373f300aac79fcd1e1d8c5 (diff)
downloadmate-desktop-bbd33e26c62a26d038c1b0d6e1d05c1aa8b682a1.tar.bz2
mate-desktop-bbd33e26c62a26d038c1b0d6e1d05c1aa8b682a1.tar.xz
mate-conf-import: Check if an applet/object file exists
Diffstat (limited to 'mate-conf/mate-conf-import')
-rwxr-xr-xmate-conf/mate-conf-import4
1 files changed, 4 insertions, 0 deletions
diff --git a/mate-conf/mate-conf-import b/mate-conf/mate-conf-import
index 23bed8b..8d0aa55 100755
--- a/mate-conf/mate-conf-import
+++ b/mate-conf/mate-conf-import
@@ -218,6 +218,8 @@ if os.path.exists(mateconf_panel_file):
for obj in objects:
debug_message("object", obj)
mateconf_obj_file = os.path.join(mateconf_user_path, "apps/panel/objects", obj, "%mateconf.xml")
+ if not os.path.exists(mateconf_obj_file):
+ continue
obj_tree = ElementTree.parse(mateconf_obj_file)
obj_root = obj_tree.getroot()
obj_id = gsettings_id(obj)
@@ -257,6 +259,8 @@ if os.path.exists(mateconf_panel_file):
for app in applets:
debug_message("applet", app)
mateconf_app_file = os.path.join(mateconf_user_path, "apps/panel/applets", app, "%mateconf.xml")
+ if not os.path.exists(mateconf_app_file):
+ continue
app_tree = ElementTree.parse(mateconf_app_file)
app_root = app_tree.getroot()
app_id = gsettings_id(app)