summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-06-04 11:03:00 (GMT)
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-06-04 11:03:00 (GMT)
commit3f5142050ebc8e2dd6736721e10d81e3fc634289 (patch)
treed013991671d388dfd447b7b64a508a493241f1ad
parent56ae6c6e7e7862b18b40f40c17bfcb10b997a4d6 (diff)
downloadcerbero-3f5142050ebc8e2dd6736721e10d81e3fc634289.tar.gz
cerbero-3f5142050ebc8e2dd6736721e10d81e3fc634289.tar.xz
config: add support for custom variants
-rw-r--r--cerbero/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cerbero/config.py b/cerbero/config.py
index e0d0336..9a55c7b 100644
--- a/cerbero/config.py
+++ b/cerbero/config.py
@@ -66,10 +66,10 @@ class Variants(object):
setattr(self, v, True)
def __getattr__(self, name):
- if name not in self.__variants:
- raise AttributeError("%s is not a known variant" % name)
- else:
+ try:
return object.__getattr__(name)
+ except:
+ raise AttributeError("%s is not a known variant" % name)
class Config (object):