Pass empty dict not None for empty environment

The server rejects any request with a None environment, so pass an
empty dict not None (we should probably also make the server more
robust so it can cope with None, but this seems the quickest and
most backwards compatible fix for now)

Change-Id: I0c3e8cd14faf257528be2254070bc40821675431
Closes-Bug: #1273993
This commit is contained in:
Steven Hardy
2014-01-29 10:00:32 +00:00
parent 62cd3154c5
commit 884d5403bc
2 changed files with 2 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ def process_environment_and_files(env_path=None, template_path=None):
env = {}
if not env_path:
return files, None
return files, env
env_url = normalise_file_path_to_url(env_path)
env_base_url = base_url_for_url(env_url)

View File

@@ -163,7 +163,7 @@ class ShellEnvironmentTest(testtools.TestCase):
def test_no_process_environment_and_files(self):
files, env = template_utils.process_environment_and_files()
self.assertIsNone(env)
self.assertEqual({}, env)
self.assertEqual({}, files)
def test_global_files(self):