summaryrefslogtreecommitdiff
path: root/portato/session.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-06-23 23:42:57 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-06-23 23:42:57 +0200
commitc0b751facc2dd5ca6dc6bf15a855e4d22dd24356 (patch)
tree4011f70cd8cbb0df76218f49744d745e1f5fa7d8 /portato/session.py
parent771d3afbe73ffdd7df3381fb0bcde737ade2e4f8 (diff)
downloadportato-c0b751facc2dd5ca6dc6bf15a855e4d22dd24356.tar.gz
portato-c0b751facc2dd5ca6dc6bf15a855e4d22dd24356.tar.bz2
portato-c0b751facc2dd5ca6dc6bf15a855e4d22dd24356.zip
allowed to dismiss the warning dialogs for keywords/useflags
Diffstat (limited to '')
-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