浏览代码

thumbnails tool: skip empty lines

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56901 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 年之前
父节点
当前提交
551c6ead36
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      tools/thumbnails.py

+ 3 - 0
tools/thumbnails.py

@@ -113,6 +113,9 @@ def make_gradient(path):
         if line.startswith("#"):
             # skip comments
             continue
+        if len(line) == 0:
+            # skip empty lines
+            continue
         records.append(line.split())
     records = [record for record in records if record[0] != 'nv' and record[0] != 'default']
     relative = False