fixed pretty print binary attr
parent
c9ecf80735
commit
fc61d03d52
|
@ -24,7 +24,7 @@ class LdapprObject(object):
|
||||||
attr='dn', width=col_width, value=self.dn)
|
attr='dn', width=col_width, value=self.dn)
|
||||||
for key, value in self.attrs.iteritems():
|
for key, value in self.attrs.iteritems():
|
||||||
for single_value in value:
|
for single_value in value:
|
||||||
if len(value) > 100: # a dirty hack to 'detect' binary attrs
|
if len(str(value)) > 100: # hack to 'detect' binary attrs
|
||||||
single_value = 'binary'
|
single_value = 'binary'
|
||||||
pretty_string += '{attr:{width}} : {value}\n'.format(
|
pretty_string += '{attr:{width}} : {value}\n'.format(
|
||||||
attr=self._case(key), width=col_width, value=single_value)
|
attr=self._case(key), width=col_width, value=single_value)
|
||||||
|
|
Loading…
Reference in New Issue