Use regex variable in eos_user.py (#23797)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-04-21 02:34:09 +05:30 committed by Nathaniel Case
parent 91644167c9
commit 527a7762e1

View file

@ -203,7 +203,7 @@ def map_config_to_obj(module):
for user in set(match):
regex = r'username %s .+$' % user
cfg = re.findall(r'username %s .+$' % user, data, re.M)
cfg = re.findall(regex, data, re.M)
cfg = '\n'.join(cfg)
obj = {
'username': user,