From 883dca4cf0784a9b0f5931b9ddacad79aa27adc0 Mon Sep 17 00:00:00 2001 From: Dmitrii Sutiagin Date: Tue, 24 Oct 2017 13:36:20 -0700 Subject: [PATCH] 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 --- specs/python-timmy.spec | 3 +++ timmy/env.py | 2 +- timmy/nodes.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/specs/python-timmy.spec b/specs/python-timmy.spec index 992657a..91cba5f 100644 --- a/specs/python-timmy.spec +++ b/specs/python-timmy.spec @@ -107,6 +107,9 @@ popd %changelog +* Tue Oct 24 2017 Dmitry Sutyagin - 1.26.13 +- Change: improve roles string split + * Fri Oct 20 2017 Dmitry Sutyagin - 1.26.12 - Fix: scripts_all_pairs does not trigger archive diff --git a/timmy/env.py b/timmy/env.py index dcbd7c0..d1140f7 100644 --- a/timmy/env.py +++ b/timmy/env.py @@ -16,7 +16,7 @@ # under the License. project_name = 'timmy' -version = '1.26.12' +version = '1.26.13' if __name__ == '__main__': import sys diff --git a/timmy/nodes.py b/timmy/nodes.py index 389c0b1..72bde5f 100644 --- a/timmy/nodes.py +++ b/timmy/nodes.py @@ -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