diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-11-10 11:42:42 -0600 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-11-10 17:35:44 -0600 |
commit | aae0bafb03ee6e986c51436ec749bbadd97a2f7f (patch) | |
tree | 387f66dacb7931c1e54a88df02869f6fb4b09cde /src/lib/Bcfg2/DBSettings.py | |
parent | 669a8fce985164632b41bcac8fef3f52223bac0e (diff) | |
download | bcfg2-aae0bafb03ee6e986c51436ec749bbadd97a2f7f.tar.gz bcfg2-aae0bafb03ee6e986c51436ec749bbadd97a2f7f.tar.bz2 bcfg2-aae0bafb03ee6e986c51436ec749bbadd97a2f7f.zip |
Options: Fixed non-path database name parsing
The database name is sometimes a path (SQLite) and sometimes not
(MySQL, PostgreSQL). This introduces a new Option type,
RepositoryMacroOption, that expands <repository> macros without
canonicalizing the path, so SQLite users can use <repository> in their
settings but MySQL users' database name settings will not be destroyed
by path canonicalization.
The unfortunate downside is that SQLite users can't use ~ in their
database name.
Diffstat (limited to 'src/lib/Bcfg2/DBSettings.py')
-rw-r--r-- | src/lib/Bcfg2/DBSettings.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/DBSettings.py b/src/lib/Bcfg2/DBSettings.py index ec27306a4..f5b5d16aa 100644 --- a/src/lib/Bcfg2/DBSettings.py +++ b/src/lib/Bcfg2/DBSettings.py @@ -212,7 +212,7 @@ class _OptionContainer(object): Bcfg2.Options.Option( cf=('database', 'engine'), default='sqlite3', help='Database engine', dest='db_engine'), - Bcfg2.Options.PathOption( + Bcfg2.Options.RepositoryMacroOption( cf=('database', 'name'), default='<repository>/etc/bcfg2.sqlite', help="Database name", dest="db_name"), Bcfg2.Options.Option( |