File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -938,7 +938,8 @@ def parse(self, datestr):
938938 return Unknown
939939 datestr = datestr .strip ().rstrip ('Z' )
940940
941- ERROR = ValueError ('Invalid datetime format. Only ISO 8601 supported.' )
941+ ERROR = ValueError ("Invalid datetime format '{}'. "
942+ "Only ISO 8601 supported." .format (datestr ))
942943 if not self ._matches_iso_format (datestr ):
943944 try :
944945 # If it is a number, assume it is a unix timestamp
Original file line number Diff line number Diff line change @@ -352,17 +352,18 @@ def commit(self):
352352 attr_index = domain .index (attr_name )
353353 attr = domain [attr_index ]
354354
355- # Parse datetime strings into floats
356- if isinstance (attr , TimeVariable ):
357- try :
358- values = [attr .parse (v ) for v in values ]
359- except ValueError as e :
360- self .error (21 , e .args [0 ])
361- return
362-
363355 if attr .is_continuous :
364356 if any (not v for v in values ):
365357 continue
358+
359+ # Parse datetime strings into floats
360+ if isinstance (attr , TimeVariable ):
361+ try :
362+ values = [attr .parse (v ) for v in values ]
363+ except ValueError as e :
364+ self .error (21 , e .args [0 ])
365+ return
366+
366367 filter = data_filter .FilterContinuous (
367368 attr_index , oper , * [float (v ) for v in values ])
368369 elif attr .is_string :
You can’t perform that action at this time.
0 commit comments