Convert password policy integer values to unicode instead of str.

This commit is contained in:
Pavel Zuna 2010-02-17 16:22:43 +01:00 committed by Rob Crittenden
parent 3785ec49ab
commit c0c86232f4

View File

@ -43,11 +43,11 @@ _global=u'global'
def _convert_time_for_output(entry_attrs): def _convert_time_for_output(entry_attrs):
# Convert seconds to hours and days for displaying to user # Convert seconds to hours and days for displaying to user
if 'krbmaxpwdlife' in entry_attrs: if 'krbmaxpwdlife' in entry_attrs:
entry_attrs['krbmaxpwdlife'][0] = str( entry_attrs['krbmaxpwdlife'][0] = unicode(
int(entry_attrs['krbmaxpwdlife'][0]) / 86400 int(entry_attrs['krbmaxpwdlife'][0]) / 86400
) )
if 'krbminpwdlife' in entry_attrs: if 'krbminpwdlife' in entry_attrs:
entry_attrs['krbminpwdlife'][0] = str( entry_attrs['krbminpwdlife'][0] = unicode(
int(entry_attrs['krbminpwdlife'][0]) / 3600 int(entry_attrs['krbminpwdlife'][0]) / 3600
) )