summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <kensington@astralcloak.net>2011-12-30 17:44:51 (GMT)
committerAnthony G. Basile <blueness@gentoo.org>2011-12-30 17:49:25 (GMT)
commitb693439b662c3d4d2bf6a445cb89c04eb924160f (patch)
treef5f35d299ef6445c0c625b1a6ccc812c84b07deb
parentDon't use has_key() for compatibility with Python 3. (diff)
downloadwebapp-config-b693439b662c3d4d2bf6a445cb89c04eb924160f.zip
webapp-config-b693439b662c3d4d2bf6a445cb89c04eb924160f.tar.gz
webapp-config-b693439b662c3d4d2bf6a445cb89c04eb924160f.tar.bz2
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.py4
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.'''