Trust add datetime fix

Fixes trust add, since now datetime object is returned
for 'modifytimestamp', which cannot be split like a string.

Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
This commit is contained in:
Adam Misnyovszki 2014-05-05 19:21:01 +02:00 committed by Alexander Bokovoy
parent 2c08a16f8f
commit fa7057b727

View File

@ -1107,7 +1107,7 @@ class TrustDomainJoins(object):
# Use realmdomains' modification timestamp to judge records last update time # Use realmdomains' modification timestamp to judge records last update time
entry = self.api.Backend.ldap2.get_entry(realm_domains['dn'], ['modifyTimestamp']) entry = self.api.Backend.ldap2.get_entry(realm_domains['dn'], ['modifyTimestamp'])
# Convert the timestamp to Windows 64-bit timestamp format # Convert the timestamp to Windows 64-bit timestamp format
trust_timestamp = long(time.mktime(time.strptime(entry['modifytimestamp'][0][:14], "%Y%m%d%H%M%S"))*1e7+116444736000000000) trust_timestamp = long(time.mktime(entry['modifytimestamp'][0].timetuple())*1e7+116444736000000000)
for dom in realm_domains['associateddomain']: for dom in realm_domains['associateddomain']:
ftinfo = dict() ftinfo = dict()