Turn off all references and API calls to billing if the feature is disabled

This commit is contained in:
Joseph Schorr 2014-04-06 00:36:19 -04:00
parent c374e8146a
commit 19a20a6c94
12 changed files with 135 additions and 62 deletions

View file

@ -124,6 +124,9 @@ def format_date(date):
def add_method_metadata(name, value):
def modifier(func):
if func is None:
return None
if '__api_metadata' not in dir(func):
func.__api_metadata = {}
func.__api_metadata[name] = value
@ -132,6 +135,9 @@ def add_method_metadata(name, value):
def method_metadata(func, name):
if func is None:
return None
if '__api_metadata' in dir(func):
return func.__api_metadata.get(name, None)
return None