[Python-modules-commits] r8285 - in packages/python-ad/trunk/debian (3 files)

mbaldessari-guest at users.alioth.debian.org mbaldessari-guest at users.alioth.debian.org
Sun Apr 19 11:25:10 UTC 2009


    Date: Sunday, April 19, 2009 @ 11:25:10
  Author: mbaldessari-guest
Revision: 8285

* Fixed str2dn patch so that old python-ldap versions still work.
  Removed version-dep on python-ldap accordingly.

Modified:
  packages/python-ad/trunk/debian/changelog
  packages/python-ad/trunk/debian/control
  packages/python-ad/trunk/debian/patches/12_fix_with_last_python_ldap_2.3.6.dpatch

Modified: packages/python-ad/trunk/debian/changelog
===================================================================
--- packages/python-ad/trunk/debian/changelog	2009-04-18 23:02:11 UTC (rev 8284)
+++ packages/python-ad/trunk/debian/changelog	2009-04-19 11:25:10 UTC (rev 8285)
@@ -5,8 +5,9 @@
   * Change homepage in the README 
   * Actually ship the html manual
   * Change str2dn calls to dn.str2dn (add dep on python-ldap >= 2.3.6)
+  * Fixed str2dn patch so that old python-ldap versions still work
 
- -- Michele Baldessari <michele at pupazzo.org>  Fri, 17 Apr 2009 15:10:33 +0200
+ -- Michele Baldessari <michele at pupazzo.org>  Sun, 19 Apr 2009 13:13:30 +0200
 
 python-ad (0.9-2) unstable; urgency=low
 

Modified: packages/python-ad/trunk/debian/control
===================================================================
--- packages/python-ad/trunk/debian/control	2009-04-18 23:02:11 UTC (rev 8284)
+++ packages/python-ad/trunk/debian/control	2009-04-19 11:25:10 UTC (rev 8285)
@@ -11,7 +11,7 @@
 
 Package: python-ad
 Architecture: any
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-ldap (>= 2.3.6), python-dnspython, python-ply, libsasl2-modules-gssapi-mit
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-ldap, python-dnspython, python-ply, libsasl2-modules-gssapi-mit
 Description: Active Directory interface module for Python
  This Python module allows the manipulation of objects in Microsoft's 
  Active Directory. 

Modified: packages/python-ad/trunk/debian/patches/12_fix_with_last_python_ldap_2.3.6.dpatch
===================================================================
--- packages/python-ad/trunk/debian/patches/12_fix_with_last_python_ldap_2.3.6.dpatch	2009-04-18 23:02:11 UTC (rev 8284)
+++ packages/python-ad/trunk/debian/patches/12_fix_with_last_python_ldap_2.3.6.dpatch	2009-04-19 11:25:10 UTC (rev 8285)
@@ -7,13 +7,20 @@
 @DPATCH@
 diff -urNad trunk~/lib/ad/core/client.py trunk/lib/ad/core/client.py
 --- trunk~/lib/ad/core/client.py	2008-10-31 15:19:34.000000000 +0100
-+++ trunk/lib/ad/core/client.py	2009-04-17 15:09:29.000000000 +0200
-@@ -95,7 +95,7 @@
++++ trunk/lib/ad/core/client.py	2009-04-19 13:13:07.000000000 +0200
+@@ -95,7 +95,14 @@
  
      def domain_name_from_dn(self, dn):
          """Given a DN, return a domain."""
 -        parts = ldap.str2dn(dn)
 +        parts = ldap.dn.str2dn(dn)
++        # python-ldap 2.3.6 moved the str2* functions in the ldap.dn namespace
++        # try both places
++        try:
++            parts = ldap.str2dn(dn)
++        except AttributeError:
++            parts = ldap.dn.str2dn(dn)
++
          parts.reverse()
          domain = []
          for part in parts:




More information about the Python-modules-commits mailing list