From 74e0041c0380064973c7301183e357eb07ff1404 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Wed, 9 Jan 2008 23:39:47 +0100 Subject: [PATCH] #5884: don't crash on non-ascii characters in essids. --- shell/hardware/nminfo.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/shell/hardware/nminfo.py b/shell/hardware/nminfo.py index c1a6326c..3a931207 100644 --- a/shell/hardware/nminfo.py +++ b/shell/hardware/nminfo.py @@ -394,15 +394,13 @@ class NMInfo(object): config.read(self._cfg_file) networks = {} for name in config.sections(): - if not isinstance(name, unicode): - name = unicode(name) - net = Network(name) try: + net = Network(name) net.read_from_config(config) networks[name] = net - except NetworkInvalidError, e: - logging.debug("Error: invalid stored network config: %s" % e) - del net + except Exception, e: + logging.error("Error when processing config for the network %s: %r" % (name, e)) + del config return networks