Closed
Bug 715216
Opened 14 years ago
Closed 13 years ago
Python's old formatting standard is incompatible with .ini files
Categories
(Socorro :: General, task)
Socorro
General
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: adrian, Unassigned)
Details
While testing the recent generic_app.py Lars created, we ran into a compatibility problem with .ini files and Python's string formatting.
The problem is that '%' characters are interpreted by .ini files, and we use those characters in logger configuration for example. Lars suggests that we switch to the newer formatting standard of Python, using {var} instead of %(var)s.
An other solution would be to not use .ini files in Socorro.
Comment 1•14 years ago
|
||
(In reply to Adrian Gaudebert [:adrian] from comment #0)
> An other solution would be to not use .ini files in Socorro.
Since I am probably the only one pushing for .ini files, I will say that I am using .ini as a proxy for "something readable/writable by a non-programmer".
For example, we expect sysadmins and DBAs to be able to directly modify Socorro config files, to change things like passwords and hostnames. This was problematic in the past when we asked them to edit our python config files directly, since they had to be aware of python's syntax rules which is not a given. We switched to using bash include files, so they are simply "key=value" but this is rather inflexible and requires modification of startup scripts and so on so it's not ideal.
I think JSON would be ok but it seems a bit noisy compared to a more traditional "config file".
Perhaps YAML would be a better middle ground?
| Reporter | ||
Comment 2•14 years ago
|
||
I think we should use whatever IT is most comfortable with. Us developers can deal with any of those file formats, and one the goals of ConfigMan was also to make IT's life easier.
CC'ing Jason for opinions.
Comment 3•14 years ago
|
||
Any of these file formats would work for us as long as we have documentation and/or a sample configuration for reference. If not, we would most likely bug you with questions or issues :)
| Reporter | ||
Comment 4•13 years ago
|
||
So we have started using .ini files all over the place, and it seems we haven't run into this problem. I'm going to mark this as invalid, and hope it is indeed.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•