瀏覽代碼

Skip closing polygon if polygon points <= 2

Kentaro Wada 7 年之前
父節點
當前提交
07f9515bb9
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      labelme/shape.py

+ 2 - 1
labelme/shape.py

@@ -56,7 +56,8 @@ class Shape(object):
 
     def close(self):
         if len(self.points) <= 2:
-            logger.warn('Polygon should be created with points >2')
+            logger.error('Polygon should be created with points >2')
+            return
         self._closed = True
 
     def addPoint(self, point):