Merge branch 'tests'
[nepi.git] / src / nepi / util / execfuncs.py
index 1753119..1f7b6b9 100644 (file)
@@ -31,7 +31,7 @@ def lexec(command,
     """
     if env:
         export = ''
-        for envkey, envval in env.iteritems():
+        for envkey, envval in env.items():
             export += '%s=%s ' % (envkey, envval)
         command = "%s %s" % (export, command)
 
@@ -155,7 +155,7 @@ def lspawn(command, pidfile,
     (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)
 
@@ -179,7 +179,7 @@ def lgetpid(pidfile):
     
     if out:
         try:
-            return map(int,out.strip().split(' ',1))
+            return [ int(x) for x in out.strip().split(' ',1))]
         except:
             # Ignore, many ways to fail that don't matter that much
             return None