From 8af0aa5ba83e053d92b1b3874aadea183ef36c6a Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 16 Mar 2016 21:51:02 +0100 Subject: [PATCH] tests/integration: fix _lldpd group creation --- tests/integration/fixtures/programs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/fixtures/programs.py b/tests/integration/fixtures/programs.py index 46afe27a..39010426 100644 --- a/tests/integration/fixtures/programs.py +++ b/tests/integration/fixtures/programs.py @@ -175,13 +175,13 @@ class LldpdFactory(object): passwd += l passwd += "{}:x:39861:39861::{}:/bin/false\n".format( user, chroot) - group = "" + fgroup = "" for l in open("/etc/group", "r").readlines(): if not l.startswith("{}:".format(group)): - group += l - group += "{}:x:39861:\n".format(group) + fgroup += l + fgroup += "{}:x:39861:\n".format(group) _replace_file(tmpdir, "/etc/passwd", passwd) - _replace_file(tmpdir, "/etc/group", group) + _replace_file(tmpdir, "/etc/group", fgroup) # Also setup the "namespace-dependant" directory tmpdir.join("ns").ensure(dir=True) -- 2.39.5