Config parser fails with inline comments

Bug #1504893 reported by Alkis Georgopoulos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
New
Low
Unassigned

Bug Description

$ tail -1 /etc/update-manager/release-upgrades
Prompt=never # Original value: Prompt=lts

I'm using inline comments like the one above to mark the original values in files that I change in /etc.
But in this case it's considered an invalid value, probably like:
Prompt="never # Original value: Prompt=lts"

From a programmer's side, maybe this can be explained with how ConfigParser inline comment parsing works by default in python etc.
But from a user's side, I think this is an unexpected problem that should be resolved... :)

Revision history for this message
Brian Murray (brian-murray) wrote :

The parsing of that configuration file is actually done by update-manager and the relevant code is in UpdateManager/Core/MetaRelease.py.

This may be a bug in configparser itself.

affects: ubuntu-release-upgrader (Ubuntu) → update-manager (Ubuntu)
Changed in update-manager (Ubuntu):
importance: Undecided → Low
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.