Fix JPK list field splitting for empty lists.
authorW. Trevor King <wking@drexel.edu>
Wed, 8 Sep 2010 20:09:23 +0000 (16:09 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 8 Sep 2010 20:09:23 +0000 (16:09 -0400)
hooke/driver/jpk.py

index 92c9a8d..afa9570 100644 (file)
@@ -349,7 +349,10 @@ class JPKDriver (Driver):
                         sub_info[s] = {}
                     sub_info = sub_info[s]
                 if setting[-1] == 'list':  # split a space-delimited list
-                    sub_info[setting[-1]] = fields[1].split(' ')
+                    if fields[1]:
+                        sub_info[setting[-1]] = fields[1].split(' ')
+                    else:
+                        sub_info[setting[-1]] = []
                 else:
                     sub_info[setting[-1]] = fields[1]
         return info