[Freeipa-devel] slow response

John Dennis jdennis at redhat.com
Mon Jul 30 17:52:25 UTC 2012


On 07/30/2012 01:17 PM, Stephen Ingram wrote:
  This is pretty much the same thing I applied previously by hand. I
> noticed that you placed import datetime on its own line so I followed
> suit. Here are the errors I'm receiving:
>
> There seems to be a problem with the format of the log information
> returned? Perhaps the fromtimestamp attribute was added after version
> 2.20?

sorry, that should be:

return 
datetime.datetime.fromtimestamp(timestamp).strftime(ISO8601_DATETIME_FMT)


In other words datetime has to be repeated twice. That's because 
fromtimestamp() is an attribute of the datetime class in the datetime 
module, thus the first datetime references the module and the second 
datetime references the datetime class in the datetime module.

I wish I had a dime for every time I typed just a single datetime ;-)

-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the Freeipa-devel mailing list