From bd4b6396a8a8bfdfaa6ece2b51b2555bb3033ac5 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 9 Jun 2015 16:25:36 +0200 Subject: [PATCH] Ensure in test we didn't load the local configuration --- gns3server/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gns3server/config.py b/gns3server/config.py index e0086b5a..e1bae39f 100644 --- a/gns3server/config.py +++ b/gns3server/config.py @@ -45,7 +45,9 @@ class Config(object): # Monitor configuration files for changes self._watched_files = {} - if sys.platform.startswith("win"): + if hasattr(sys, "_called_from_test"): + self._files = files + elif sys.platform.startswith("win"): appname = "GNS3" @@ -87,6 +89,8 @@ class Config(object): os.path.join("/etc/xdg", appname + ".conf"), filename] + if self._files is None: + self._files = [] self.clear() self._watch_config_file()