#5884 BLOC Update.: funky character in AP name means no X
Zarro Boogs per Child
bugtracker at laptop.org
Tue Jan 8 17:13:46 EST 2008
#5884: funky character in AP name means no X
----------------------+-----------------------------------------------------
Reporter: markvdb | Owner: tomeu
Type: defect | Status: new
Priority: blocker | Milestone: Update.1
Component: sugar | Version: Build 650
Resolution: | Keywords: review?
Verified: 0 | Blocking:
Blockedby: |
----------------------+-----------------------------------------------------
Changes (by tomeu):
* cc: marco (added)
* keywords: => review?
Comment:
The following patch fixes the encoding mismatch and also protects us from
other unexpected failures in the reading of the network config file:
{{{
diff --git a/shell/hardware/nminfo.py b/shell/hardware/nminfo.py
index c1a6326..3a93120 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
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/5884#comment:3>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list