[Bugs] #277 HIGH: all APs have the same colors

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Sun Feb 1 11:43:27 EST 2009


#277: all APs have the same colors
---------------------------+------------------------------------------------
    Reporter:  tomeu       |          Owner:  erikos           
        Type:  defect      |         Status:  new              
    Priority:  High        |      Milestone:  0.84             
   Component:  sugar       |        Version:  Git as of bugdate
    Severity:  Major       |     Resolution:                   
    Keywords:              |   Distribution:  Ubuntu           
Status_field:  Unconfimed  |  
---------------------------+------------------------------------------------

Comment(by tomeu):

 org.freedesktop.DBus.Properties.GetAll is not working as expected. See
 this code and its result:

 {{{
 import dbus
 bus = dbus.SystemBus()

 nm = bus.get_object('org.freedesktop.NetworkManager',
 '/org/freedesktop/NetworkManager')
 nm = dbus.Interface(nm, 'org.freedesktop.NetworkManager')
 devices = nm.GetDevices()
 for device in devices:
     device = bus.get_object('org.freedesktop.NetworkManager', device)
     props = dbus.Interface(device, 'org.freedesktop.DBus.Properties')
     if props.Get('org.freedesktop.NetworkManager.Device', 'DeviceType') ==
 2:
         break

 wireless = dbus.Interface(device,
 'org.freedesktop.NetworkManager.Device.Wireless')
 aps = wireless.GetAccessPoints()
 ap = bus.get_object('org.freedesktop.NetworkManager', aps[0])

 props = dbus.Interface(ap, 'org.freedesktop.DBus.Properties')

 print props.GetAll('', byte_arrays=True)
 print props.Get('', 'Ssid', byte_arrays=True)
 }}}

 GetAll says that there are no properties, but Get will show that there
 are:

 {{{
 >>> print props.GetAll('', byte_arrays=True)
 dbus.Dictionary({}, signature=dbus.Signature('sv'))
 >>> print props.Get('', 'Ssid', byte_arrays=True)
 DEN
 }}}

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/277#comment:3>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list