parsing errors in an accomplishment file will crash the daemon

Bug #1024041 reported by Matt Fischer on 2012-07-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Daemon
Matt Fischer

Bug Description

If you have 1 accomplishment file with a parse error the whole daemon will crash. I think that logging the bad accomplishment and moving on to the next one is a better solution:

It will crash reload_accom_database() and also the constructor for Accomplishment

  File "../../../accomplishments/daemon/", line 852, in reload_accom_database
  File "/usr/lib/python2.7/", line 305, in read
    self._read(fp, filename)
  File "/usr/lib/python2.7/", line 546, in _read
    raise e
ParsingError: File contains parsing errors: /tmp/tmp8ZeCDd/accomplishments/accomplishments/testaccomp/en/bad.accomplishment
 [line 2]: 'descriptionbad desc\n'

Here's my simple bad accomplishment:

descriptionbad desc

Related branches

Matt Fischer (mfisch) wrote :


When this is fixed the unittest test_bad_accomplishment_list() needs to be re-enabled and the unit test test_bad_accomplishment_parse() needs to be removed.

Changed in ubuntu-accomplishments-daemon:
assignee: nobody → Rafal Cieślak (rafalcieslak256)
Jono Bacon (jonobacon) on 2012-07-28
Changed in ubuntu-accomplishments-daemon:
milestone: none → 0.3
status: New → Confirmed
importance: Undecided → High
Matt Fischer (mfisch) on 2012-07-28
Changed in ubuntu-accomplishments-daemon:
assignee: Rafal Cieślak (rafalcieslak256) → Matt Fischer (mfisch)
status: Confirmed → In Progress
Matt Fischer (mfisch) on 2012-07-31
Changed in ubuntu-accomplishments-daemon:
status: In Progress → Fix Committed
Changed in ubuntu-accomplishments-daemon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers