Ubuntu Accomplishments Daemon

parsing errors in an accomplishment file will crash the daemon

Reported by Matt Fischer on 2012-07-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Daemon
High
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/api.py", line 852, in reload_accom_database
    accomcfg.read(translatedpath)
  File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", 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:

[accomplishment]
descriptionbad desc

Matt Fischer (mfisch) wrote :

Note:

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