[Sugar-devel] [PATCH] fix network disconnect and discard history

James Cameron quozl at laptop.org
Thu Oct 28 22:08:05 EDT 2010


On Thu, Oct 28, 2010 at 04:11:35PM -0200, Esteban Arias wrote:
> I press "discard history" and shell.logs shows: [...]
>   File "/usr/lib/python2.6/site-packages/jarabe/model/network.py", line 506, in clear_wifi_connections
>     if conn.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
> AttributeError: 'NMSettingsConnection' object has no attribute 'type'
> 
> If I switch "conn.type" to "conn._settings.connection" runs ok.

It should be conn._settings.connection.type.

You replied quoting an earlier patch of mine from 2010-05-25.  The most
recent patch (without the fix you just provided) is in the ticket #1673
and is marked "for uruguay consensus".  It remains out-of-tree, still.
Not enough interest in the fix.  "discard history" still does nothing in
HEAD.

The patch that was accepted into sucrose-0.84 was simpler; it discarded
GSM connections as well as wireless 802.11 connections, by not checking
the connection type:

    def clear_connections(self):
        for connection in self.connections.values():
            connection.Removed()
        self.connections = {}

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list