Django

Code

Changeset 7003

Show
Ignore:
Timestamp:
01/06/08 16:20:39 (6 months ago)
Author:
jbronn
Message:

gis: gdal: Fixed Driver and DataSource? bug reported by David Hancock in django-users and reproduced by tlp.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis/django/contrib/gis/gdal/datasource.py

    r6686 r7003  
    6868        # Registering all the drivers, this needs to be done 
    6969        #  _before_ we try to open up a data source. 
    70         if not get_driver_count() and not register_all(): 
    71             raise OGRException('Could not register all the OGR data source drivers!') 
     70        if not get_driver_count(): register_all() 
    7271 
    7372        if isinstance(ds_input, basestring): 
  • django/branches/gis/django/contrib/gis/gdal/driver.py

    r6686 r7003  
    5757        "Attempts to register all the data source drivers." 
    5858        # Only register all if the driver count is 0 (or else all drivers 
    59         #  will be registered over and over again) 
    60         if not self.driver_count and not register_all(): 
    61             raise OGRException('Could not register all the OGR data source drivers!') 
     59        # will be registered over and over again) 
     60        if not self.driver_count: register_all() 
    6261                     
    6362    # Driver properties 
  • django/branches/gis/django/contrib/gis/gdal/prototypes/generation.py

    r6686 r7003  
    104104        func.restype = c_int 
    105105        func.errcheck = check_errcode 
     106    else: 
     107        func.restype = None 
     108         
    106109    return func 
    107110