From 65f3c3fce4a4520ece6009b9b109a4bb4bf89b49 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Feb 2022 04:33:18 +0100 Subject: [PATCH] ignore the django import check --- InvenTree/manage.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/InvenTree/manage.py b/InvenTree/manage.py index dc8d382fac..84db5b09cd 100755 --- a/InvenTree/manage.py +++ b/InvenTree/manage.py @@ -6,17 +6,17 @@ if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "InvenTree.settings") try: from django.core.management import execute_from_command_line - except ImportError: + except ImportError: # pragma: no cover # The above import may fail for some other reason. Ensure that the # issue is really that Django is missing to avoid masking other # exceptions on Python 2. - try: - import django # NOQA - except ImportError: + try: # pragma: no cover + import django # pragma: no cover + except ImportError: # pragma: no cover raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" - ) - raise + ) # pragma: no cover + raise # pragma: no cover execute_from_command_line(sys.argv)