diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index adf34971f9..98f75e0310 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -55,7 +55,7 @@ def find_management_module(app_name): except ImportError as e: if os.path.basename(os.getcwd()) != part: raise e - finally: + else: if f: f.close()