Upgradeprovision error

Michael Wood esiotrot at gmail.com
Wed Jun 23 08:42:18 MDT 2010


s4 upgradeprovision: Try to support older Pythons.
    
Use "...".split(sep, 1) instead of "...".partition(sep).
---
 source4/scripting/python/samba/upgradehelpers.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py
index 5890745..64ebd13 100755
--- a/source4/scripting/python/samba/upgradehelpers.py
+++ b/source4/scripting/python/samba/upgradehelpers.py
@@ -422,7 +422,7 @@ def identic_rename(ldbobj, dn):
     :param lbdobj: An Ldb Object
     :param dn: DN of the object to manipulate
     """
-    (before, sep, after)=str(dn).partition('=')
+    (before, after) = str(dn).split('=', 1)
     ldbobj.rename(dn, ldb.Dn(ldbobj, "%s=foo%s" % (before, after)))
     ldbobj.rename(ldb.Dn(ldbobj, "%s=foo%s" % (before, after)), dn)
 
-- 
Michael Wood <esiotrot at gmail.com>


More information about the samba-technical mailing list