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:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user