From 673435fe901a42a2f6fbd0f14cda97fddced5205 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Feb 2022 04:56:42 +0100 Subject: [PATCH] simpler coverage ignore --- InvenTree/manage.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/InvenTree/manage.py b/InvenTree/manage.py index 0c49645b23..959fc2787e 100755 --- a/InvenTree/manage.py +++ b/InvenTree/manage.py @@ -10,13 +10,13 @@ if __name__ == "__main__": # 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: # pragma: no cover - import django # pragma: no cover # noqa: F401 - except ImportError: # pragma: no cover + try: + import django # noqa: F401 + except ImportError: 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?" - ) # pragma: no cover - raise # pragma: no cover + ) + raise execute_from_command_line(sys.argv)