summaryrefslogtreecommitdiff
path: root/portato/session.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/session.py')
-rw-r--r--portato/session.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/portato/session.py b/portato/session.py
index da15171..5d1a640 100644
--- a/portato/session.py
+++ b/portato/session.py
@@ -105,9 +105,18 @@ class Session (object):
except SectionNotFoundException:
self._cfg.add_section(section)
self._cfg.add(key, value, section, with_blankline = False)
-
+
def get (self, key, section):
- return self._cfg.get(key, section)
+ try:
+ return self._cfg.get(key, section)
+ except KeyError:
+ return None
+
+ def get_boolean (self, key, section):
+ try:
+ return self._cfg.get_boolean(key, section)
+ except KeyError:
+ return None
def check_version (self, vers):
pass # do nothing atm