fixing possible errors on pypy2

This commit is contained in:
Kamil Gałuszka 2014-09-22 05:01:24 +02:00 committed by montiniz
parent 7e7542ef2b
commit 2f43a66055

View file

@ -124,8 +124,7 @@ class Admin2(object):
import_module("%s.admin2" % app_name)
except ImportError as e:
if str(e) == "No module named admin2" \
or str(e) == "No module named '%s.admin2'" % (app_name):
if str(e).startswith("No module named") and 'admin2' in str(e):
continue
raise e