merge 3.6 default/stable stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 12 Feb 2010 13:35:12 +0100
branchstable
changeset 4560 23e0632df615
parent 4556 43c14e0e8972 (diff)
parent 4552 79f461d7ec37 (current diff)
child 4564 38f0562b744b
merge 3.6 default/stable
--- a/migration.py	Thu Feb 11 12:18:46 2010 +0100
+++ b/migration.py	Fri Feb 12 13:35:12 2010 +0100
@@ -70,8 +70,11 @@
     ability to show the script's content
     """
     while True:
-        answer = ASK.ask('Execute %r ?' % scriptpath, ('Y','n','show'), 'Y')
-        if answer == 'n':
+        answer = ASK.ask('Execute %r ?' % scriptpath,
+                         ('Y','n','show','abort'), 'Y')
+        if answer == 'abort':
+            raise SystemExit(1)
+        elif answer == 'n':
             return False
         elif answer == 'show':
             stream = open(scriptpath)
--- a/server/sources/ldapuser.py	Thu Feb 11 12:18:46 2010 +0100
+++ b/server/sources/ldapuser.py	Fri Feb 12 13:35:12 2010 +0100
@@ -78,7 +78,7 @@
         ('auth-realm',
          {'type' : 'string',
           'default': None,
-          'help': 'realm to use when using gssapp/kerberos authentication.',
+          'help': 'realm to use when using gssapi/kerberos authentication.',
           'group': 'ldap-source', 'inputlevel': 1,
           }),
 
--- a/toolsutils.py	Thu Feb 11 12:18:46 2010 +0100
+++ b/toolsutils.py	Fri Feb 12 13:35:12 2010 +0100
@@ -10,6 +10,7 @@
 # XXX move most of this in logilab.common (shellutils ?)
 
 import os, sys
+import subprocess
 from os import listdir, makedirs, environ, chmod, walk, remove
 from os.path import exists, join, abspath, normpath
 
@@ -75,8 +76,8 @@
     user decision
     """
     import shutil
-    p_output = os.popen('diff -u %s %s' % (appl_file, ref_file), 'r')
-    diffs = p_output.read()
+    pipe = subprocess.Popen(['diff', '-u', appl_file, ref_file], stdout=subprocess.PIPE)
+    diffs = pipe.stdout.read()
     if diffs:
         if askconfirm:
             print