diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-06-23 23:42:57 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-06-23 23:42:57 +0200 |
commit | c0b751facc2dd5ca6dc6bf15a855e4d22dd24356 (patch) | |
tree | 4011f70cd8cbb0df76218f49744d745e1f5fa7d8 /portato/session.py | |
parent | 771d3afbe73ffdd7df3381fb0bcde737ade2e4f8 (diff) | |
download | portato-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.py | 13 |
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 |