diff --git a/aerich/migrate.py b/aerich/migrate.py index c4ea4a2..9a26053 100644 --- a/aerich/migrate.py +++ b/aerich/migrate.py @@ -64,7 +64,7 @@ class Migrate: def remove_old_model_file(cls, app: str, location: str): try: os.unlink(cls.get_old_model_file(app, location)) - except FileNotFoundError: + except (OSError, FileNotFoundError): pass @classmethod