If a srs of a layer does not have a srid it should return None instead of throwing a Type Error.
I am using this dataset: http://www.eng.hctx.net/gis/Shapefiles/ZIP CODE.zip
>>> from django.contrib.gis.gdal import DataSource
>>> ds = DataSource("/home/osc/data/zipcode/zipcodep.shp")
>>> layer = ds[0]
In [40]: layer.srs.srid
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call last)
/home/geo/geo/<ipython console> in <module>()
/home/geo/local/lib/python2.5/site-packages/django/contrib/gis/gdal/srs.py in srid(self)
206 """
207 try:
--> 208 return int(self.attr_value('AUTHORITY', 1))
209 except ValueError:
210 return None
<type 'exceptions.TypeError'>: int() argument must be a string or a number, not 'NoneType'