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
j...@horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to