Path: Catch error if ofstShape has no Area attribute

This commit is contained in:
Russell Johnson
2021-02-19 21:16:26 -06:00
parent 2b4158addc
commit 215967fe78

View File

@@ -933,7 +933,11 @@ class ObjectProfile(PathAreaOp.ObjectOp):
# CHECK for ZERO area of offset shape
try:
osArea = ofstShp.Area
if hasattr(ofstShp, "Area"):
osArea = ofstShp.Area
else:
PathLog.error('No area to offset shape returned.\n')
return list()
except Exception as ee:
PathLog.error('No area to offset shape returned.\n{}'.format(ee))
return list()