Change: improve roles string split

This change has been requested by Dmitrii Kabanov dkabanov@mirantis.com.
Now if roles is a string, it does not have to have spaces after commas.

Change-Id: I8b7bae1e1f2a4955dda9440b629393f18edc6fac
This commit is contained in:
Dmitrii Sutiagin 2017-10-24 13:36:20 -07:00
parent 377f3bb085
commit 883dca4cf0
3 changed files with 5 additions and 2 deletions

View File

@ -107,6 +107,9 @@ popd
%changelog
* Tue Oct 24 2017 Dmitry Sutyagin <dsutyagin@mirantis.com> - 1.26.13
- Change: improve roles string split
* Fri Oct 20 2017 Dmitry Sutyagin <dsutyagin@mirantis.com> - 1.26.12
- Fix: scripts_all_pairs does not trigger archive

View File

@ -16,7 +16,7 @@
# under the License.
project_name = 'timmy'
version = '1.26.12'
version = '1.26.13'
if __name__ == '__main__':
import sys

View File

@ -59,7 +59,7 @@ class Node(object):
if type(roles) is list:
self.roles = roles
else:
self.roles = roles.split(', ') if roles else []
self.roles = re.split(', *', roles) if roles else []
self.os_platform = os_platform
self.online = online
self.status = status