Ubuntu Accomplishments Daemon

get_block_ubuntuone_notification_bubbles() parses config on it's own, should use config.get_boolean()

Reported by Matt Fischer on 2012-07-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Daemon
Undecided
Matt Fischer

Bug Description

get_block_ubuntuone_notification_bubbles() shouldn't be hand-parsing config files, it should use config.get_boolean() to handle it. The ConfigParser allows for values more than "false" and "False" according to the docs.

            config = ConfigParser.ConfigParser()
            config.read(cfile)

            if(config.read(cfile)):
                if config.has_section("notifications"):
                    val = config.get('notifications', 'show_all_notifications')
                    if val == "false" or val == "False":
                        return True
                    else:
                        return False

Matt Fischer (mfisch) on 2012-07-19
Changed in ubuntu-accomplishments-daemon:
assignee: nobody → Matt Fischer (mfisch)
Matt Fischer (mfisch) on 2012-07-19
Changed in ubuntu-accomplishments-daemon:
status: New → In Progress
Changed in ubuntu-accomplishments-daemon:
milestone: none → 0.3
Matt Fischer (mfisch) on 2012-07-23
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