1.1 --- a/imiptools/client.py Fri Aug 14 00:44:53 2015 +0200
1.2 +++ b/imiptools/client.py Sat Aug 15 22:56:51 2015 +0200
1.3 @@ -429,10 +429,10 @@
1.4 for period in self.obj.get_periods(tzid):
1.5 start = period.get_start()
1.6 end = period.get_end()
1.7 - start_result = self.check_resolution(start, resolution)
1.8 - end_result = self.check_resolution(end, resolution)
1.9 - if start_result or end_result:
1.10 - invalid.append((period.origin, start_result, end_result))
1.11 + start_errors = self.check_resolution(start, resolution)
1.12 + end_errors = self.check_resolution(end, resolution)
1.13 + if start_errors or end_errors:
1.14 + invalid.append((period.origin, start_errors, end_errors))
1.15
1.16 return invalid
1.17
1.18 @@ -444,15 +444,16 @@
1.19 raise ValidityError
1.20
1.21 hours, minutes, seconds = resolution
1.22 + errors = []
1.23
1.24 if hours and dt.hour not in hours:
1.25 - return "hour"
1.26 + errors.append("hour")
1.27 if minutes and dt.minute not in minutes:
1.28 - return "minute"
1.29 + errors.append("minute")
1.30 if seconds and dt.second not in seconds:
1.31 - return "second"
1.32 + errors.append("second")
1.33
1.34 - return None
1.35 + return errors
1.36
1.37 # Object retrieval.
1.38