From 1e1315aa80b01c7442fc5792d74b7e60d08a225e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 8 Sep 2010 16:09:23 -0400 Subject: [PATCH] Fix JPK list field splitting for empty lists. --- hooke/driver/jpk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hooke/driver/jpk.py b/hooke/driver/jpk.py index 92c9a8d..afa9570 100644 --- a/hooke/driver/jpk.py +++ b/hooke/driver/jpk.py @@ -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 -- 2.26.2