diff options
| author | David Pravec <David.Pravec@danix.org> | 2010-12-16 12:35:46 +0100 |
|---|---|---|
| committer | David Pravec <David.Pravec@danix.org> | 2010-12-16 12:35:46 +0100 |
| commit | 8060b526e1fecc66a6766de3f9e4b008e69af1e3 (patch) | |
| tree | a0c5e35fc2b920ba2c9247637135141063241d2e /nova | |
| parent | edff8090714f11305d6dbc091a96eece20f0d1a1 (diff) | |
Make nova work even when user has LANG or LC_ALL configured
Some commands are having different results when used in another language environment.
For example ifconfig output parsing fails in my language.
Also unittest using cat failed, as it didnt expect czech language in the error message.
This small patch makes it work.
Also adding myself to 'Authors' file.
Diffstat (limited to 'nova')
| -rwxr-xr-x | nova/cloudpipe/bootscript.sh | 1 | ||||
| -rw-r--r-- | nova/tests/process_unittest.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/nova/cloudpipe/bootscript.sh b/nova/cloudpipe/bootscript.sh index 30d9ad102..551b40f2f 100755 --- a/nova/cloudpipe/bootscript.sh +++ b/nova/cloudpipe/bootscript.sh @@ -19,6 +19,7 @@ # This gets zipped and run on the cloudpipe-managed OpenVPN server +export LC_ALL=C export SUPERVISOR="http://10.255.255.1:8773/cloudpipe" export VPN_IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{print $1}'` export BROADCAST=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f3 | awk '{print $1}'` diff --git a/nova/tests/process_unittest.py b/nova/tests/process_unittest.py index 67245af03..516b2452f 100644 --- a/nova/tests/process_unittest.py +++ b/nova/tests/process_unittest.py @@ -49,7 +49,7 @@ class ProcessTestCase(test.TrialTestCase): def test_execute_stderr(self): pool = process.ProcessPool(2) - d = pool.simple_execute('cat BAD_FILE', check_exit_code=False) + d = pool.simple_execute('LC_ALL=C cat BAD_FILE', check_exit_code=False) def _check(rv): self.assertEqual(rv[0], '') |
