From f5eedd2a7e7622bffabcbd30d92c2aeb6d9526ec Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 3 Nov 2024 18:46:52 +0100 Subject: [PATCH] Python bindings: hopefully fix 'VSIFile' object has no attribute '_closed' exception of https://github.com/OSGeo/gdal/actions/runs/11653171606/job/32445274458?pr=11199 (master only) --- swig/include/python/gdal_python.i | 1 + 1 file changed, 1 insertion(+) diff --git a/swig/include/python/gdal_python.i b/swig/include/python/gdal_python.i index fac167ee295b..67610e5cfc4e 100644 --- a/swig/include/python/gdal_python.i +++ b/swig/include/python/gdal_python.i @@ -5018,6 +5018,7 @@ class VSIFile(BytesIO): self._fp = VSIFOpenExL(self._path, self._mode, True) if self._fp is None: + self._closed = True raise OSError(VSIGetLastErrorMsg()) self._closed = False