Calendar indicator crashes since it cannot parse a specific time string

Bug #1086335 reported by Gökçen Eraslan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Calendar-Indicator
Fix Released
Critical
Lorenzo Carbonell

Bug Description

When I install and run the indicator, I encountered with this exception:

Traceback (most recent call last):
  File "/usr/bin/calendar-indicator", line 43, in <module>
    ci=CalendarIndicator()
  File "/usr/share/calendar-indicator/calendarindicator.py", line 211, in __init__
    self.update_menu()
  File "/usr/share/calendar-indicator/calendarindicator.py", line 316, in update_menu
    com =getTimeAndDateV2(self.events[0]['start'][key_event_time])
  File "/usr/share/calendar-indicator/calendarindicator.py", line 101, in getTimeAndDateV2
    com2 = datetime.datetime.strptime(temp2[0],'%H:%M:%S')
UnboundLocalError: local variable 'temp2' referenced before assignment

When I print the relevant time_string parameter of getTimeAndDateV2 method, I see "2012-12-04T12:00:00Z" string. I think the inner else part of getTimeAndDateV2 function has a typo, since there is no temp2 variable. It may be changed to temp[1] but this does not fix my case.

strptime(temp[1],'%H:%M:%S') must also be changed to strptime(temp[1],'%H:%M:%SZ') but I don't know what Z stands for.

Gökçen Eraslan (gkcn)
summary: - Calendar indicator crashes since cannot parse a specific time string
+ Calendar indicator crashes since it cannot parse a specific time string
Changed in calendar-indicator:
assignee: nobody → Lorenzo Carbonell (lorenzo-carbonell)
importance: Undecided → Critical
status: New → In Progress
Changed in calendar-indicator:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.