diff --git a/django/contrib/gis/gdal/prototypes/raster.py b/django/contrib/gis/gdal/prototypes/raster.py index 8641b86b44..b4519a853d 100644 --- a/django/contrib/gis/gdal/prototypes/raster.py +++ b/django/contrib/gis/gdal/prototypes/raster.py @@ -30,10 +30,7 @@ get_driver_description = const_string_output(std_call('GDALGetDescription'), [c_ # Raster Data Source Routines create_ds = voidptr_output(std_call('GDALCreate'), [c_void_p, c_char_p, c_int, c_int, c_int, c_int, c_void_p]) open_ds = voidptr_output(std_call('GDALOpen'), [c_char_p, c_int]) -if GDAL_VERSION >= (2, 0): - close_ds = voidptr_output(std_call('GDALClose'), [c_void_p]) -else: - close_ds = void_output(std_call('GDALClose'), [c_void_p]) +close_ds = void_output(std_call('GDALClose'), [c_void_p], errcheck=False) flush_ds = int_output(std_call('GDALFlushCache'), [c_void_p]) copy_ds = voidptr_output( std_call('GDALCreateCopy'),