[processing] fixed wrong call to addToLog

This commit is contained in:
volaya 2016-04-26 12:46:30 +02:00
parent 250f6578d9
commit 5cc2dcd2a4

View File

@ -58,7 +58,7 @@ def buffering(progress, writer, distance, field, useField, layer, dissolve,
inGeom = QgsGeometry(inFeat.geometry())
if inGeom.isGeosEmpty() or not inGeom.isGeosValid():
ProcessingLog.addToLog('Feature {} has empty or invalid geometry. Skipping...'.format(inFeat.id()), ProcessingLog.LOG_WARNING)
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING, 'Feature {} has empty or invalid geometry. Skipping...'.format(inFeat.id()))
continue
outGeom = inGeom.buffer(float(value), segments)
if first:
@ -83,7 +83,7 @@ def buffering(progress, writer, distance, field, useField, layer, dissolve,
value = distance
inGeom = QgsGeometry(inFeat.geometry())
if inGeom.isGeosEmpty() or not inGeom.isGeosValid():
ProcessingLog.addToLog('Feature {} has empty or invalid geometry. Skipping...'.format(inFeat.id()), ProcessingLog.LOG_WARNING)
ProcessingLog.addToLog( ProcessingLog.LOG_WARNING, 'Feature {} has empty or invalid geometry. Skipping...'.format(inFeat.id()))
continue
outGeom = inGeom.buffer(float(value), segments)