Opened 3 years ago

Last modified 2 years ago

#3223 new defect

Moon fails to launch with bad clock

Reported by: dsd Owned by: garycmartin
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Moon Version: Unspecified
Severity: Unspecified Keywords: easy-hack
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

If the system clock is bad (e.g. year 2000), Moon-13 fails to launch:

Traceback (most recent call last):
  File "/usr/bin/sugar-activity", line 21, in <module>
    main.main()
  File "/usr/lib/python2.7/site-packages/sugar/activity/main.py", line 158, in main
    create_activity_instance(activity_constructor, activity_handle)
  File "/usr/lib/python2.7/site-packages/sugar/activity/main.py", line 37, in create_activity_instance
    activity = constructor(handle)
  File "/home/olpc/Activities/Moon.activity/moon.py", line 174, in __init__
    self.update_text_information_view()
  File "/home/olpc/Activities/Moon.activity/moon.py", line 248, in update_text_information_view
    self.data_model.update_moon_calculations(time.time())
  File "/home/olpc/Activities/Moon.activity/moon.py", line 468, in update_moon_calculations
    last_new_moon_sec = self.last_new_moon_sec_at_time(the_date)
  File "/home/olpc/Activities/Moon.activity/moon.py", line 612, in last_new_moon_sec_at_time
    return now - last
UnboundLocalError: local variable 'last' referenced before assignment

Change History (1)

comment:1 Changed 2 years ago by godiard

  • Keywords easy-hack added

The activity should show a nice message.

Note: See TracTickets for help on using tickets.