# Path: kittystore/events.py
# def subscribe(target, eventclass):
# def notify(event):
# def subscribe_to(eventclass):
#     def wrapper(f):
# def reset():
# 
# Path: kittystore/utils.py
# def get_mailman_client(settings):
#     try:
#         mm_client = mailmanclient.Client('%s/3.0' %
#                         settings.MAILMAN_REST_SERVER,
#                         settings.MAILMAN_API_USER,
#                         settings.MAILMAN_API_PASS)
#     except (HTTPError, mailmanclient.MailmanConnectionError), e:
#         raise HTTPError(e)
#     return mm_client


from urllib2 import HTTPError
from uuid import UUID
from kittystore import events
from kittystore.utils import get_mailman_client
import mailmanclient
import logging
# -*- coding: utf-8 -*-
"""
Cached values concerning emails
"""



logger = logging.getLogger(__name__)


_MAILMAN_CLIENT = None


def get_user_id(store, sender):
    global _MAILMAN_CLIENT
    if _MAILMAN_CLIENT is None:

# Path: kittystore/events.py
# def subscribe(target, eventclass):
# def notify(event):
# def subscribe_to(eventclass):
#     def wrapper(f):
# def reset():
# 
# Path: kittystore/utils.py
# def get_mailman_client(settings):
#     try:
#         mm_client = mailmanclient.Client('%s/3.0' %
#                         settings.MAILMAN_REST_SERVER,
#                         settings.MAILMAN_API_USER,
#                         settings.MAILMAN_API_PASS)
#     except (HTTPError, mailmanclient.MailmanConnectionError), e:
#         raise HTTPError(e)
#     return mm_client


# Path: kittystore/caching/mailman_user.py
from urllib2 import HTTPError
from uuid import UUID
from kittystore import events
from kittystore.utils import get_mailman_client
import mailmanclient
import logging

# -*- coding: utf-8 -*-
"""
Cached values concerning emails
"""



logger = logging.getLogger(__name__)


_MAILMAN_CLIENT = None


def get_user_id(store, sender):
    global _MAILMAN_CLIENT
    if _MAILMAN_CLIENT is None:

        _MAILMAN_CLIENT = get_mailman_client(store.settings)