From e6afe9d691a70b678c4b1d788356a0eba1da5a02 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Fri, 17 Dec 2010 14:39:44 +0000 Subject: fix typo and catch NoSectionError in config --- src/config.py | 4 ++-- src/core.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.py b/src/config.py index 685c8eb6..33bfc1db 100644 --- a/src/config.py +++ b/src/config.py @@ -22,7 +22,7 @@ from/to the config file DEFSECTION = "Poezio" -from configparser import RawConfigParser, NoOptionError +from configparser import RawConfigParser, NoOptionError, NoSectionError from os import environ, makedirs, path from shutil import copy2 from optparse import OptionParser @@ -52,7 +52,7 @@ class Config(RawConfigParser): res = self.getboolean(option, section) else: res = self.getstr(option, section) - except NoOptionError: + except NoOptionError, NoSectionError: return default return res diff --git a/src/core.py b/src/core.py index ba07abb8..833f2848 100644 --- a/src/core.py +++ b/src/core.py @@ -755,7 +755,7 @@ class Core(object): if isinstance(tab, tabs.PrivateTab): if tab.get_name() == complete_jid: self.command_win('%s' % tab.nb) - return tag.get_room() + return tab.get_room() # create the new tab room = self.get_room_by_name(room_name) if not room: -- cgit v1.2.3