On Fri, Aug 27, 2010 at 21:53, Jeffrey Ratcliffe
<[email protected]> wrote:
> On 27 August 2010 09:28, Jeffrey Ratcliffe <[email protected]> 
> wrote:
>> It took this poor Perl hacker somewhat longer than 15 minutes to come
>> up with a Python script that works. For possible comments, and to
>> prevented reinvented wheels (or scripts), I've attached what I ended
>> up with.
>
> I'm definitely missing something - the additions are not being saved
> to the database, and therefore do not last a reboot.
>
> Any ideas?
>
> Jeff

Strange, your code seems to be (almost) correct. Maybe you were hit by
some opimd/sqlite bug. Please report it if will happen again.

Why almost? If you got first error while retrieving message from SIM,
you can't just break the loop, as there can be more messages at later
positions.

You should use something like that:

slots = sim.GetSimInfo()['slots']
for i in range(0, slots):
  try:
    message = sim.RetrieveMessage(i)
  except:
    pass
  # rest of your code here

(wrote from memory)

-- 
Sebastian Krzyszkowiak
dos
_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user

Reply via email to