fix TypeError: module object is not callable

Same issue from last commit fbbc5c4c2c
but for Neutron script.

Change-Id: I71d1cc24df0f66f834a4b29569b10a9710ea0422
This commit is contained in:
Emilien Macchi 2014-11-12 15:48:50 +01:00
parent fbbc5c4c2c
commit ca9a7cda3e
1 changed files with 2 additions and 2 deletions

View File

@ -109,9 +109,9 @@ class Novautils(object):
# now, after checking http://stackoverflow.com/a/16307378,
# and http://stackoverflow.com/a/8778548 made my mind to this approach
@staticmethod
def totimestamp(dt=None, epoch=datetime(1970, 1, 1)):
def totimestamp(dt=None, epoch=datetime.datetime(1970, 1, 1)):
if not dt:
dt = datetime.utcnow()
dt = datetime.datetime.utcnow()
td = dt - epoch
# return td.total_seconds()
return int((td.microseconds + (td.seconds + td.days * 24 * 3600)