]> git.ipfire.org Git - nitsi.git/commitdiff
Initialize settings dict with defaults values
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 21 Jun 2018 08:11:53 +0000 (10:11 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 21 Jun 2018 08:11:53 +0000 (10:11 +0200)
Even when we never change parts of the dict later we need to make sure that we
have at least some good default values in it.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
src/nitsi/test.py

index ec7a4d58104c69b1c1d7deae7612ebb6e8e0ad2a..19c8c405e72bed17cd9807563068f28103c1a624 100755 (executable)
@@ -21,6 +21,13 @@ class Test():
         # init settings var
         self.settings = {}
 
+        # Set default values for the settings dict
+        self.settings["name"] = ""
+        self.settings["description"] = ""
+        self.settings["copy_from"] = None
+        self.settings["copy_to"] = None
+        self.settings["virtual_environ_path"] = None
+
         self.cmd_settings = cmd_settings
         self.log_path = log_path