parsing errors in an accomplishment file will crash the daemon

Bug #1024041 reported by Matt Fischer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Daemon
Fix Released
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

Related branches

Revision history for this message
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)
Changed in ubuntu-accomplishments-daemon:
milestone: none → 0.3
status: New → Confirmed
importance: Undecided → High
Matt Fischer (mfisch)
Changed in ubuntu-accomplishments-daemon:
assignee: Rafal Cieślak (rafalcieslak256) → Matt Fischer (mfisch)
status: Confirmed → In Progress
Matt Fischer (mfisch)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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