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

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

Related branches

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