[tracker] functional-tests: Remove test dconf db only when it exists



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]