From: John M. <jw...@ho...> - 2010-03-23 18:11:19
|
ldif.py won't parse with the python option '-tt', which enforces consistent whitespace. It's a simple fix of replacing the handful of tabs with spaces. john --- ldif.py.orig 2010-03-23 13:50:19.000000000 -0400 +++ ldif.py 2010-03-23 13:50:43.000000000 -0400 @@ -355,20 +355,20 @@ if attr_type=='dn': # attr type and value pair was DN of LDIF record if dn!=None: - raise ValueError, 'Two lines starting with dn: in one record.' + raise ValueError, 'Two lines starting with dn: in one record.' if not is_dn(attr_value): - raise ValueError, 'No valid string-representation of distinguished name %s.' % (repr(attr_value)) + raise ValueError, 'No valid string-representation of distinguished name %s.' % (repr(attr_value)) dn = attr_value elif attr_type=='version' and dn is None: version = 1 elif attr_type=='changetype': # attr type and value pair was DN of LDIF record if dn is None: - raise ValueError, 'Read changetype: before getting valid dn: line.' + raise ValueError, 'Read changetype: before getting valid dn: line.' if changetype!=None: - raise ValueError, 'Two lines starting with changetype: in one record.' + raise ValueError, 'Two lines starting with changetype: in one record.' if not valid_changetype_dict.has_key(attr_value): - raise ValueError, 'changetype value %s is invalid.' % (repr(attr_value)) + raise ValueError, 'changetype value %s is invalid.' % (repr(attr_value)) changetype = attr_value elif attr_value!=None and \ not self._ignored_attr_types.has_key(attr_type.lower()): -- John Morrissey _o /\ ---- __o jw...@ho... _-< \_ / \ ---- < \, www.horde.net/ __(_)/_(_)________/ \_______(_) /_(_)__ |