]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/systemd: Fix quote warnings
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 6 Aug 2024 11:01:04 +0000 (16:31 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 20 Aug 2024 20:42:50 +0000 (14:42 -0600)
Fix "Q001 Single quote multiline found but double quotes preferred" and
multiple "Q000 Double quotes found but single quotes preferred"
warnings.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/systemd.py

index dd339fbf9b170e8f5b030633b164a283445adbf3..581e433aedfc510961e14c0685139040a81f9484 100644 (file)
@@ -35,14 +35,14 @@ class Systemd(object):
     # configuration file, that gets passed to the cgconfigparser tool to
     # create systemd slice/scope.
     @staticmethod
-    def write_config_with_pid(config, config_fname, _slice, scope, setdefault="yes"):
+    def write_config_with_pid(config, config_fname, _slice, scope, setdefault='yes'):
         pid = config.process.create_process(config)
-        config_file = '''systemd {{
+        config_file = """systemd {{
             slice = {};
             scope = {};
             setdefault = {};
             pid = {};
-        }}'''.format(_slice, scope, setdefault, pid)
+        }}""".format(_slice, scope, setdefault, pid)
 
         f = open(config_fname, 'w')
         f.write(config_file)