From 2f1930b0be21a40077676c6fc19a6b95801caa9e Mon Sep 17 00:00:00 2001 From: aozarov Date: Wed, 6 Jul 2016 10:06:08 -0700 Subject: [PATCH] Remove a special case where the appengine-pipeline generate task_target improperly when module == 'default'. The sepecial case is causing a failure after a recent changes to dev_appserver (Taskqueue 'target' made compatible with dev_appserver) when taskqueue.py tries to parse module name. For background see cl/126706214. --- python/src/pipeline/util.py | 2 -- python/test/util_test.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/python/src/pipeline/util.py b/python/src/pipeline/util.py index 96f28e86..e253158b 100755 --- a/python/src/pipeline/util.py +++ b/python/src/pipeline/util.py @@ -63,8 +63,6 @@ def _get_task_target(): version = os.environ["CURRENT_VERSION_ID"].split(".")[0] module = os.environ["CURRENT_MODULE_ID"] - if module == "default": - return version return "%s.%s" % (version, module) diff --git a/python/test/util_test.py b/python/test/util_test.py index 74019815..980a473d 100644 --- a/python/test/util_test.py +++ b/python/test/util_test.py @@ -41,10 +41,10 @@ def testGetTaskTarget(self): def testGetTaskTargetDefaultModule(self): os.environ["CURRENT_MODULE_ID"] = "default" - self.assertEqual("v7", util._get_task_target()) + self.assertEqual("v7.default", util._get_task_target()) task = taskqueue.Task(url="/relative_url", target=util._get_task_target()) - self.assertEqual("v7", task.target) + self.assertEqual("v7.default", task.target) if __name__ == '__main__':