lp://staging/~donkirkby/openobject-server/config-defaults
As I proposed in the bug, here's what I did:
1. Define all 47 options that the user can set in the OptionParser and set
their default values from a dictionary.
2. Check if the configuration file was specified on the command line, through
an environment variable, or by being in an expected location.
3. If we're using a configuration file, parse it with ConfigParser and update
all the default values in the dictionary and set them on the OptionParser. Then
parse the command line again. That way the command line will always override a
configuration file. (That seems to be the convention, I checked fetchmail's
man page.)
4. Copy all the values from the OptionParser into the config.options dictionary.
I did not end up adding alternate option names to match those that appear in the configuration file.
- Get this branch:
- bzr branch lp://staging/~donkirkby/openobject-server/config-defaults
Branch merges
- Olivier Dony (Odoo): Needs Resubmitting
- Mantavya Gajjar (Open ERP): Pending requested
- Xavier (Open ERP): Pending requested
- Stephane Wirtel (OpenERP): Pending requested
- Jay Vora (Serpent Consulting Services): Pending requested
-
Diff: 289 lines (+96/-64)1 file modifiedbin/tools/config.py (+96/-64)
Related bugs
Related blueprints
Branch information
Recent revisions
- 1952. By Don <don@don-desktop-openerp>
-
Remove default values of None. Add some options to the command line that were only available in config files. Convert some parameters to strings for backward compatibility. Save translate_modules as comma separated list without brackets or quotes.
- 1950. By Don <don@don-desktop-openerp>
-
move all default values from the option definitions to a dictionary called defaults.
- 1949. By Don <don@don-desktop-openerp>
-
some debug code to dump the contents of tools.config.
options (I'll remove it before making a merge proposal) - 1948. By Jay Vora (Serpent Consulting Services)
-
[FIX] Custom fields should be removed from _columns too
- 1947. By Jay Vora (Serpent Consulting Services)
-
[MERGE/FIX] Merged Stephane's branch for disabling the cache for ir.rule
- 1946. By Jay Vora (Serpent Consulting Services)
-
[FIX] M2O : Unfair behavior of M2O for access denial records and normal ones(All records were hidden by access denied if one had failed to meet access rights).
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)