diff options
author | 2011-12-30 12:44:51 -0500 | |
---|---|---|
committer | 2011-12-30 12:49:25 -0500 | |
commit | b693439b662c3d4d2bf6a445cb89c04eb924160f (patch) | |
tree | f5f35d299ef6445c0c625b1a6ccc812c84b07deb | |
parent | Don't use has_key() for compatibility with Python 3. (diff) | |
download | webapp-config-b693439b662c3d4d2bf6a445cb89c04eb924160f.tar.gz webapp-config-b693439b662c3d4d2bf6a445cb89c04eb924160f.tar.bz2 webapp-config-b693439b662c3d4d2bf6a445cb89c04eb924160f.zip |
Forward-compat WEB_CATEGORY variable
Versions previous to 1.50.18 did not include WEB_CATEGORY which was
stored in ${webapp_installed_dir}/.webapp, but newer versions require it.
Make old installations forward-compatible by pretending this variable exists.
Reported-By: Patrick <mail@patrick-nagel.net>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
X-Gentoo-Bug: 355295
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=355295
-rw-r--r-- | WebappConfig/dotconfig.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WebappConfig/dotconfig.py b/WebappConfig/dotconfig.py index 610d1e3..ad3d894 100644 --- a/WebappConfig/dotconfig.py +++ b/WebappConfig/dotconfig.py @@ -119,6 +119,10 @@ class DotConfig: def __getitem__(self, key): if key in self.__data.keys(): return self.__data[key] + # this key didn't exist in old versions, but new versions + # expect it. fix bug 355295 + elif key == 'WEB_CATEGORY': + return '' def __dot_config(self): ''' Returns the full path to the dot config file.''' |