Agreed. As I was doing it I was thinking I'm repeating myself here... I'll
put it into a function.


On Tue, May 14, 2013 at 6:00 PM, Chris Cook <notifications@github.com>wrote:

> In boto/cloudformation/stack.py:
>
> > @@ -123,9 +126,15 @@ def endElement(self, name, value, connection):
> >          elif name == 'StackName':
> >              self.stack_name = value
> >          elif name == 'CreationTime':
> > -            self.creation_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')
> > +            try:
> > +                self.creation_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')
> > +            except ValueError:
> > +                self.creation_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')
>
> What about extracting this to a function rather than repeating this logic
> many times?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/sirca/boto/pull/2/files#r4209198>
> .
>



-- 
Gonzalo Servat
Systems Administrator, SIRCA Ltd
Level 4, 55 Harrington St, The Rocks NSW 2000
PO Box H58 Australia Square NSW 1215
Tel: +61 2 8355 2552
Fax: +61 2 9231 5988
www.sirca.org.au