]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests/integration: fix _lldpd group creation
authorVincent Bernat <vincent@bernat.im>
Wed, 16 Mar 2016 20:51:02 +0000 (21:51 +0100)
committerVincent Bernat <vincent@bernat.im>
Wed, 16 Mar 2016 20:51:02 +0000 (21:51 +0100)
tests/integration/fixtures/programs.py

index 46afe27aad39e106961d1379f2883e90e8bf4657..390104266402c0ec86b7370cfca9d99a0b5e2bd6 100644 (file)
@@ -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)