Fixes to how singledispatch is imported

This commit is contained in:
Adam Charnock 2015-12-05 09:01:11 +00:00
parent bbbf688449
commit 1988519536

View File

@ -51,16 +51,16 @@ def get_filtering_args_from_filterset(filterset_class, type):
def import_single_dispatch(): def import_single_dispatch():
singledispatch = None
try: try:
from functools import singledispatch from functools import singledispatch
except ImportError: except ImportError:
pass singledispatch = None
try: if not singledispatch:
from singledispatch import singledispatch try:
except ImportError: from singledispatch import singledispatch
pass except ImportError:
pass
if not singledispatch: if not singledispatch:
raise Exception( raise Exception(