summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/session.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/portato/session.py b/portato/session.py
index 440d4bf..89684be 100644
--- a/portato/session.py
+++ b/portato/session.py
@@ -42,6 +42,7 @@ class Session (object):
self._cfg = None
self._handlers = []
+ self._name = name
if not (os.path.exists(SESSION_DIR) and os.path.isdir(SESSION_DIR)):
os.mkdir(SESSION_DIR)
@@ -124,20 +125,26 @@ class Session (object):
self._cfg.write()
- def set (self, key, value, section):
+ def set (self, key, value, section = ""):
+ if not section: section = self._name
+
try:
self._cfg.add(key, value, section, with_blankline = False)
except SectionNotFoundException:
self._cfg.add_section(section)
self._cfg.add(key, value, section, with_blankline = False)
- def get (self, key, section):
+ def get (self, key, section = ""):
+ if not section: section = self._name
+
try:
return self._cfg.get(key, section)
except KeyError:
return None
- def get_boolean (self, key, section):
+ def get_boolean (self, key, section = ""):
+ if not section: section = self._name
+
try:
return self._cfg.get_boolean(key, section)
except KeyError:
onfig&id=e021fff1ef2be1327b3edc2bb43332753a1fff16&follow=1'>Moved GtkThread to gui.utilsRené 'Necoro' Neumann5-29/+25 2008-06-22Implemented the mail sendingRené 'Necoro' Neumann2-3/+63 2008-06-22First mail window draftRené 'Necoro' Neumann3-0/+220 2008-06-10Added gpytage pluginRené 'Necoro' Neumann2-0/+29 2008-06-10Modified plugin.xsd so it allows also menu-only pluginsRené 'Necoro' Neumann2-7/+8 2008-06-10Fixed the default handlingRené 'Necoro' Neumann1-1/+1 2008-06-10Allowed default for session; load 'app-portage/portato' as default for select...René 'Necoro' Neumann2-10/+18 2008-06-09Fixed 'kill' in the systray popupRené 'Necoro' Neumann1-2/+2 2008-06-09Fixed error messageRené 'Necoro' Neumann2-4/+1 2008-06-08Make blocks way more intelligentRené 'Necoro' Neumann3-45/+107