fix make_app logic

This commit is contained in:
Martin Zimmermann 2014-03-06 11:05:22 +01:00
parent 3b248b293f
commit 772730dbcd

View File

@ -145,15 +145,16 @@ class Isso(object):
def make_app(conf=None, threading=True, multiprocessing=False, uwsgi=False): def make_app(conf=None, threading=True, multiprocessing=False, uwsgi=False):
if not any((threading, multiprocessing, uwsgi)):
raise RuntimeError("either set threading, multiprocessing or uwsgi")
if threading: if threading:
class App(Isso, ThreadedMixin): class App(Isso, ThreadedMixin):
pass pass
elif multiprocessing:
if multiprocessing:
class App(Isso, ProcessMixin): class App(Isso, ProcessMixin):
pass pass
else:
if uwsgi:
class App(Isso, uWSGIMixin): class App(Isso, uWSGIMixin):
pass pass