return None if no key found, avoid KeyError
authorKali Kaneko <kali@leap.se>
Tue, 30 Apr 2013 19:05:03 +0000 (04:05 +0900)
committerKali Kaneko <kali@leap.se>
Tue, 30 Apr 2013 19:07:16 +0000 (04:07 +0900)
setup.py
src/leap/common/__init__.py
src/leap/common/config/baseconfig.py

index 3c0f9de..d5323bc 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ setup(
     name='leap.common',
     # If you change version, do it also in
     # src/leap/common/__init__.py
-    version='0.2.1-dev',
+    version='0.2.1-dev2',
     url='https://leap.se/',
     license='GPLv3+',
     author='The LEAP Encryption Access Project',
index 19c43c9..a5ea197 100644 (file)
@@ -16,4 +16,4 @@ except ImportError:
 
 __all__ = ["certs", "check", "files", "events"]
 
-__version__ = "0.2.1-dev"
+__version__ = "0.2.1-dev2"
index edb9b24..146f1e4 100644 (file)
@@ -70,12 +70,11 @@ class BaseConfig:
         @return: returns the value for the specified key in the config
         """
         leap_assert(self._config_checker, "Load the config first")
-        return self._config_checker.config[key]
+        return self._config_checker.config.get(key, None)
 
     def get_path_prefix(self):
         """
         Returns the platform dependant path prefixer
-
         """
         return get_platform_prefixer().get_path_prefix(
             standalone=self.standalone)