Fixing bug in execfuncs when setting the username
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 20 Mar 2014 00:50:17 +0000 (01:50 +0100)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 20 Mar 2014 00:50:17 +0000 (01:50 +0100)
src/nepi/resources/omf/omf_client.py
src/nepi/util/execfuncs.py

index f216fba..ac76cd3 100644 (file)
@@ -27,14 +27,14 @@ try:
         pass
 except ImportError:
     msg = ("SleekXMPP is not installed. Without this library "
-          " you will be not able to use OMF Resources "
-          " if you want to install SleekXmpp : \n"
+          "you will be not able to use OMF Resources "
+          "if you want to install SleekXmpp: \n"
           " git clone -b develop git://github.com/fritzy/SleekXMPP.git \n"
           " cd SleekXMPP \n"
           " sudo python setup.py install\n")
 
     logger = Logger("BaseOMFClient")
-    logger.debug(msg)
+    logger.warning(msg)
 
     class BaseOMFClient(object):
         pass
index c998038..6b5f1a5 100644 (file)
@@ -38,8 +38,10 @@ def lexec(command,
 
     if sudo:
         command = "sudo %s" % command
-    elif user:
-        command = "su %s ; %s " % (user, command)
+    
+    # XXX: Doing 'su user' blocks waiting for a password on stdin
+    #elif user:
+    #    command = "su %s ; %s " % (user, command)
 
     proc = subprocess.Popen(command,
                 shell = True,