From 7bdb02f3901fb897b29b78c784820a59779a3282 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 4 Aug 2015 15:01:08 +0200 Subject: python 2.6 fix --- src/isodate/duration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/isodate/duration.py b/src/isodate/duration.py index 8740815..a901865 100644 --- a/src/isodate/duration.py +++ b/src/isodate/duration.py @@ -213,8 +213,8 @@ class Duration(object): if isinstance(other, int): newduration = Duration( years=self.years * other, - months=self.months * other, - seconds=self.tdelta.total_seconds() * other) + months=self.months * other) + newduration.tdelta = self.tdelta * other return newduration raise TypeError('unsupported operand type(s) for +: %s and %s' % (self.__class__, other.__class__)) @@ -224,8 +224,8 @@ class Duration(object): if isinstance(other, int): newduration = Duration( years=self.years * other, - months=self.months * other, - seconds=self.tdelta.total_seconds() * other) + months=self.months * other) + newduration.tdelta = self.tdelta * other return newduration raise TypeError('unsupported operand type(s) for +: %s and %s' % (other.__class__, self.__class__)) -- cgit v1.2.1