Revision: f630872d0712
Branch:   default
Author:   Mika Hänninen <mika.hanni...@gmail.com>
Date:     Tue Jun 11 00:38:35 2013
Log:      process lib: use robot.utils get_env_vars
http://code.google.com/p/robotframework/source/detail?r=f630872d0712

Modified:
 /src/robot/libraries/Process.py
 /src/robot/utils/robotenv.py

=======================================
--- /src/robot/libraries/Process.py     Tue Jun 11 00:05:15 2013
+++ /src/robot/libraries/Process.py     Tue Jun 11 00:38:35 2013
@@ -19,7 +19,8 @@
 import subprocess
 import sys

-from robot.utils import ConnectionCache, encode_to_system, decode_from_system +from robot.utils import (ConnectionCache, encode_to_system, decode_from_system,
+                         get_env_vars)
 from robot.version import get_version
 from robot.api import logger

@@ -547,7 +548,7 @@
             if not key.startswith('env:'):
raise RuntimeError("'%s' is not supported by this keyword." % key)
             if env is None:
-                env = os.environ.copy()
+                env = get_env_vars(upper=False)
             env[key[4:]] = rest[key]
         if env:
             env = dict((encode_to_system(key), encode_to_system(env[key]))
=======================================
--- /src/robot/utils/robotenv.py        Thu Jun  6 07:00:44 2013
+++ /src/robot/utils/robotenv.py        Tue Jun 11 00:38:35 2013
@@ -40,9 +40,9 @@
         del os.environ[_encode(name)]
     return value

-def get_env_vars():
-    # name is upper-cases consistently on Windows regardless interpreter
- return dict((name if os.sep == '/' else name.upper(), get_env_var(name))
+def get_env_vars(upper=os.sep != '/'):
+    # by default, name is upper-cased on Windows regardless interpreter
+    return dict((name if not upper else name.upper(), get_env_var(name))
                 for name in (_decode(name) for name in os.environ))


--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to