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 92c9a8da63c6ae21fd63bd9aa4abd834cbb93b4b..afa95704251c9fbb7a8ed214b726a38a2d45b55e 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