Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 601cd7dae -> abcf1ce86


AMBARI-21690 Updating get_stack_version pattern match (mugdha)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/abcf1ce8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/abcf1ce8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/abcf1ce8

Branch: refs/heads/branch-2.6
Commit: abcf1ce8619bb0459c633f63fc2e2edaa7f04f64
Parents: 601cd7d
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 10 11:57:28 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 11 09:59:07 2017 +0530

----------------------------------------------------------------------
 .../resource_management/libraries/functions/get_stack_version.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/abcf1ce8/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
index 7274a59..463d61f 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
@@ -85,7 +85,7 @@ def get_stack_version(package_name):
 
   stack_version = re.sub(package_name + ' - ', '', stack_output)
   stack_version = stack_version.rstrip()
-  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', stack_version)
+  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?', stack_version)
 
   if match is None:
     Logger.info('Failed to get extracted version with ' + stack_selector_path)

Reply via email to