mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #28569 -- Fixed gis_tests.inspectapp.tests.OGRInspectTest.test_time_field.
This commit is contained in:
		| @@ -87,8 +87,9 @@ class DataSource(GDALBase): | ||||
|     def __getitem__(self, index): | ||||
|         "Allows use of the index [] operator to get a layer at the index." | ||||
|         if isinstance(index, str): | ||||
|             layer = capi.get_layer_by_name(self.ptr, force_bytes(index)) | ||||
|             if not layer: | ||||
|             try: | ||||
|                 layer = capi.get_layer_by_name(self.ptr, force_bytes(index)) | ||||
|             except GDALException: | ||||
|                 raise IndexError('Invalid OGR layer name given: %s.' % index) | ||||
|         elif isinstance(index, int): | ||||
|             if 0 <= index < self.layer_count: | ||||
|   | ||||
| @@ -28,7 +28,7 @@ destroy_ds = void_output(lgdal.OGR_DS_Destroy, [c_void_p], errcheck=False) | ||||
| release_ds = void_output(lgdal.OGRReleaseDataSource, [c_void_p]) | ||||
| get_ds_name = const_string_output(lgdal.OGR_DS_GetName, [c_void_p]) | ||||
| get_layer = voidptr_output(lgdal.OGR_DS_GetLayer, [c_void_p, c_int]) | ||||
| get_layer_by_name = voidptr_output(lgdal.OGR_DS_GetLayerByName, [c_void_p, c_char_p], errcheck=False) | ||||
| get_layer_by_name = voidptr_output(lgdal.OGR_DS_GetLayerByName, [c_void_p, c_char_p]) | ||||
| get_layer_count = int_output(lgdal.OGR_DS_GetLayerCount, [c_void_p]) | ||||
|  | ||||
| # Layer Routines | ||||
|   | ||||
		Reference in New Issue
	
	Block a user