Changeset View
Changeset View
Standalone View
Standalone View
pykolab/conf/entitlement.py
Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Lines | def __init__(self, *args, **kw): | ||||
license = License(stdout, self.entitlement) | license = License(stdout, self.entitlement) | ||||
license.verify_certificate(customer_cert_file) | license.verify_certificate(customer_cert_file) | ||||
self.entitlement = license.get() | self.entitlement = license.get() | ||||
# else: | # else: | ||||
# log.error(_("Error reading entitlement certificate authority file")) | # log.error(_("Error reading entitlement certificate authority file")) | ||||
def get(self): | def get(self): | ||||
if len(self.entitlement.keys()) == 0: | if len(self.entitlement) == 0: | ||||
return None | return None | ||||
else: | else: | ||||
return self.entitlement | return self.entitlement | ||||
class License(object): | class License(object): | ||||
entitlement = {} | entitlement = {} | ||||
def __init__(self, new_entitlement, existing_entitlement): | def __init__(self, new_entitlement, existing_entitlement): | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |