From: W. Trevor King Date: Wed, 8 Sep 2010 20:09:23 +0000 (-0400) Subject: Fix JPK list field splitting for empty lists. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1e1315aa80b01c7442fc5792d74b7e60d08a225e;p=hooke.git Fix JPK list field splitting for empty lists. --- 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