diff --git a/Lib/ldif.py b/Lib/ldif.py index e06cbd3..f68838e 100644 --- a/Lib/ldif.py +++ b/Lib/ldif.py @@ -152,9 +152,7 @@ def _unparseEntryRecord(self,entry): entry dictionary holding an entry """ - attr_types = entry.keys()[:] - attr_types.sort() - for attr_type in attr_types: + for attr_type in sorted(entry.keys()): for attr_value in entry[attr_type]: self._unparseAttrTypeandValue(attr_type,attr_value)