comparison flys-backend/contrib/shpimporter/importer.py @ 5160:0dae9e77c5da

Importer fix issues reported by pylint
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 01 Mar 2013 13:51:45 +0100
parents c5187ab9f571
children b3a15fa3d88e
comparison
equal deleted inserted replaced
5159:074051942f92 5160:0dae9e77c5da
28 28
29 def getTablename(self): 29 def getTablename(self):
30 raise NotImplementedError("Importer.getTablename is abstract!") 30 raise NotImplementedError("Importer.getTablename is abstract!")
31 31
32 def getName(self): 32 def getName(self):
33 raise NotImplementedError("Importer.getTablename is abstract!") 33 raise NotImplementedError("Importer.getName is abstract!")
34
35 def isGeometryValid(self, geomType):
36 raise NotImplementedError("Importer.isGeometryValid is abstract!")
37
38 def createNewFeature(self, featureDef, feat, **args):
39 raise NotImplementedError("Importer.createNewFeature is abstract!")
34 40
35 def IsFieldSet(self, feat, name): 41 def IsFieldSet(self, feat, name):
36 if not name: 42 if not name:
37 return False 43 return False
38 if feat.GetFieldIndex(name) == -1: 44 if feat.GetFieldIndex(name) == -1:
231 237
232 try: 238 try:
233 if self.dry_run: 239 if self.dry_run:
234 return geomType 240 return geomType
235 destLayer.CommitTransaction() 241 destLayer.CommitTransaction()
236 except e: 242 except:
237 logger.error("Exception while committing transaction.") 243 logger.error("Exception while committing transaction.")
238 244
239 return geomType 245 return geomType

http://dive4elements.wald.intevation.org