summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-01-04 12:29:49 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-01-04 12:29:49 +0100
commit6570fb06a787f3b3bf59d40e412105c0a9f4eedc (patch)
tree12498a99bdd6c033f8ea05850d6a8d7402b1ed26 /pykolab
parent84b58bf324226ac321cee8726bb46d864318cb9e (diff)
downloadpykolab-6570fb06a787f3b3bf59d40e412105c0a9f4eedc.tar.gz
Don't forget to try/except importing the Entitlements class, and then only fail afterwards
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/conf/__init__.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/pykolab/conf/__init__.py b/pykolab/conf/__init__.py
index b078162..69d592e 100644
--- a/pykolab/conf/__init__.py
+++ b/pykolab/conf/__init__.py
@@ -48,14 +48,15 @@ class Conf(object):
self.entitlement = None
- from pykolab.conf.entitlement import Entitlement
- self.entitlement = Entitlement().get()
-
- #try:
- #from pykolab.conf.entitlement import Entitlement
- #self.entitlement = Entitlement().get()
- #except:
- #pass
+ try:
+ from pykolab.conf.entitlement import Entitlement
+ entitlements = True
+ except:
+ entitlements = False
+ pass
+
+ if entitlements:
+ self.entitlement = Entitlement().get()
self.plugins = None