# HG changeset patch # User Andre Heinecke # Date 1359373481 -3600 # Node ID 8e99d2d9364d207432a05b495ba1f85c990b79fb # Parent 89a8764cabcceb1950c2957331674bb409d45258 Importer: When not tracking dont print info about unimported fields diff -r 89a8764cabcc -r 8e99d2d9364d flys-backend/contrib/shpimporter/importer.py --- a/flys-backend/contrib/shpimporter/importer.py Mon Jan 28 12:27:04 2013 +0100 +++ b/flys-backend/contrib/shpimporter/importer.py Mon Jan 28 12:44:41 2013 +0100 @@ -171,15 +171,16 @@ shpimporter.INFO("Failed to create %i features" % creationFailed) shpimporter.INFO("Found %i unsupported features" % unsupported) - unhandled = [] - for i in range(0, srcLayer.GetLayerDefn().GetFieldCount()): - act_field = srcLayer.GetLayerDefn().GetFieldDefn(i).GetNameRef() - if not act_field in self.handled_fields: - unhandled.append(act_field) + if self.tracking_import: + unhandled = [] + for i in range(0, srcLayer.GetLayerDefn().GetFieldCount()): + act_field = srcLayer.GetLayerDefn().GetFieldDefn(i).GetNameRef() + if not act_field in self.handled_fields: + unhandled.append(act_field) - if len(unhandled): - shpimporter.INFO("Did not import values from fields: %s " % \ - " ".join(unhandled)) + if len(unhandled): + shpimporter.INFO("Did not import values from fields: %s " % \ + " ".join(unhandled)) try: if self.config.dry_run > 0: