Ejemplo n.º 1
0
 def moved_function(*args, **kwargs):
     from services.pluginreg import _resolve_name
     warnings.warn("%s has moved to %s" % (func.__name__, moved_to),
                   category=DeprecationWarning, stacklevel=2)
     if follow_redirect:
         new_func = _resolve_name(moved_to)
         return new_func(*args, **kwargs)
     else:
         return func(*args, **kwargs)
Ejemplo n.º 2
0
 def moved_function(*args, **kwargs):
     from services.pluginreg import _resolve_name
     warnings.warn("%s has moved to %s" % (func.__name__, moved_to),
                   category=DeprecationWarning, stacklevel=2)
     if follow_redirect:
         new_func = _resolve_name(moved_to)
         return new_func(*args, **kwargs)
     else:
         return func(*args, **kwargs)
Ejemplo n.º 3
0
 def _init(self, config, validator = None):
     self.msg_backend = get_message_backend(config)
     self.msg_queue_name = config.get('notifs_queue_name')
     if validator is None:
         validator = config.get('validator', None)
         if validator is not None:
             try:
                 self.validator = _resolve_name(validator)
             except ImportError:
                 raise KeyError('Validator class not found %s' % validator)
     else:
         self.validator = validator