fix typo and catch NoSectionError in config

parent c77842e1
...@@ -22,7 +22,7 @@ from/to the config file ...@@ -22,7 +22,7 @@ from/to the config file
DEFSECTION = "Poezio" DEFSECTION = "Poezio"
from configparser import RawConfigParser, NoOptionError from configparser import RawConfigParser, NoOptionError, NoSectionError
from os import environ, makedirs, path from os import environ, makedirs, path
from shutil import copy2 from shutil import copy2
from optparse import OptionParser from optparse import OptionParser
...@@ -52,7 +52,7 @@ class Config(RawConfigParser): ...@@ -52,7 +52,7 @@ class Config(RawConfigParser):
res = self.getboolean(option, section) res = self.getboolean(option, section)
else: else:
res = self.getstr(option, section) res = self.getstr(option, section)
except NoOptionError: except NoOptionError, NoSectionError:
return default return default
return res return res
......
...@@ -755,7 +755,7 @@ class Core(object): ...@@ -755,7 +755,7 @@ class Core(object):
if isinstance(tab, tabs.PrivateTab): if isinstance(tab, tabs.PrivateTab):
if tab.get_name() == complete_jid: if tab.get_name() == complete_jid:
self.command_win('%s' % tab.nb) self.command_win('%s' % tab.nb)
return tag.get_room() return tab.get_room()
# create the new tab # create the new tab
room = self.get_room_by_name(room_name) room = self.get_room_by_name(room_name)
if not room: if not room:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment