On 7/19/09, Vikas Saurabh <[email protected]> wrote:
>> Instead of making iface at start, make listener like this:
>>
>> bus.add_signal_receiver(on_sim_ready, signal_name='ReadyStatus',
>> dbus_interface='org.freesmartphone.GSM.SIM',
>> bus_name='org.freesmartphone.ogsmd')
>>
> Ah! thats the trick to leave the responsibility on the bus...pretty neat
> indeed.
>
> BTW, thats would mean that I can't check GetSimReady before waiting
> for the signal..ie. if for some reason SIM is ready before the script
> runs (like if we setup some init script) then we won't get ReadyStatus
> and the script would be stuck??
>
> Hmm...or we can try creating the object first...if that fails then we
> resort to this kind of wait? Is there a better/more neat way of doing
> it?
>
> --Vikas

Just use exception handling:

try:
  make_iface
  GetSimReady
except:
  install_handler
_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user

Reply via email to