From: Vincent Bernat Date: Wed, 16 Mar 2016 20:51:02 +0000 (+0100) Subject: tests/integration: fix _lldpd group creation X-Git-Tag: 0.9.2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8af0aa5ba83e053d92b1b3874aadea183ef36c6a;p=thirdparty%2Flldpd.git tests/integration: fix _lldpd group creation --- 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)