# Copyright (C) 2013 INRIA
#
# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
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,
(out,err), proc = lexec(cmd)
if proc.wait():
- raise RuntimeError, "Failed to set up application on host %s: %s %s" % (host, out,err,)
+ raise RuntimeError("Failed to set up application on host %s: %s %s" % (host, out,err,))
return ((out,err), proc)