Hi,
this patch fixes trust add, since now datetime object is returned for
'modifytimestamp', which cannot be split like a string, thus causing an
error.
Thanks
AdamFrom afe6d32cb0912c18fa046992a1e27f352b454dcb Mon Sep 17 00:00:00 2001
From: Adam Misnyovszki amisn...@redhat.com
Date: Mon, 5 May 2014 19:21:01 +0200
Subject: [PATCH] Trust add datetime fix
Fixes trust add, since now datetime object is returned
for 'modifytimestamp', which cannot be split like a string.
---
ipaserver/dcerpc.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
index 3b89adc084caf5a21021d29ab55d3f088c4422bc..312761662c6fbde0c3c2136e14ac3d4f48c125c7 100644
--- a/ipaserver/dcerpc.py
+++ b/ipaserver/dcerpc.py
@@ -1107,7 +1107,7 @@ class TrustDomainJoins(object):
# Use realmdomains' modification timestamp to judge records last update time
entry = self.api.Backend.ldap2.get_entry(realm_domains['dn'], ['modifyTimestamp'])
# 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+1164447360)
+trust_timestamp = long(time.mktime(entry['modifytimestamp'][0].timetuple())*1e7+1164447360)
for dom in realm_domains['associateddomain']:
ftinfo = dict()
--
1.9.0
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel