Fixed import structure because testing was broken

This commit is contained in:
Raphael Michel
2015-09-09 23:56:34 +02:00
parent 101f1c77e0
commit 2f0bb5f39f
3 changed files with 6 additions and 9 deletions

View File

@@ -1,6 +1 @@
__version__ = "0.0.0" __version__ = "0.0.0"
try:
from .celery import app as celery_app
except ImportError:
pass

View File

@@ -9,4 +9,9 @@ class PretixBaseConfig(AppConfig):
from . import exporter # NOQA from . import exporter # NOQA
from . import payment # NOQA from . import payment # NOQA
try:
from .celery import app as celery_app # NOQA
except ImportError:
pass
default_app_config = 'pretix.base.PretixBaseConfig' default_app_config = 'pretix.base.PretixBaseConfig'

View File

@@ -72,10 +72,7 @@ def mail(user: User, subject: str, template: str, context: dict=None, event: Eve
def mail_send(to, subject, body, sender): def mail_send(to, subject, body, sender):
email = EmailMessage( email = EmailMessage(subject, body, sender, to=to)
subject, body, sender,
to=to
)
try: try:
email.send(fail_silently=False) email.send(fail_silently=False)