[tracker] functional-tests: Remove test dconf db only when it exists
- From: Ivan Frade <ifrade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] functional-tests: Remove test dconf db only when it exists
- Date: Wed, 23 Mar 2011 15:48:53 +0000 (UTC)
commit 663cae27839c0420d416c23be16317a60c83eda3
Author: Ivan Frade <ivan frade nokia com>
Date: Wed Mar 23 17:46:59 2011 +0200
functional-tests: Remove test dconf db only when it exists
tests/functional-tests/common/utils/dconf.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/dconf.py b/tests/functional-tests/common/utils/dconf.py
index 010f1d6..33de837 100644
--- a/tests/functional-tests/common/utils/dconf.py
+++ b/tests/functional-tests/common/utils/dconf.py
@@ -23,8 +23,9 @@ class DConfClient:
assert profile == "trackertest"
# XDG_CONFIG_HOME is useless
dconf_db = os.path.join (os.environ ["HOME"], ".config", "dconf", profile)
- print "[Conf] Removing dconf-profile:", dconf_db
- os.remove (dconf_db)
+ if os.path.exists (dconf_db):
+ print "[Conf] Removing dconf-profile:", dconf_db
+ os.remove (dconf_db)
if __name__ == "__main__":
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]