]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Introduce vim modeline for python sources
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 10 Feb 2022 21:44:05 +0000 (14:44 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 10 Feb 2022 21:44:18 +0000 (14:44 -0700)
Introduce vim modeline to python source files. This sets up the
vim editor to PEP-8 recommend editing style. The vim modeline added:
"# vim: set et ts=4 sw=4:"

'et' converts the tabs to spaces, 'ts' set the tabs indentation/tabstop
to 4 characters and 'sw' sets the shiftwidth to 4 characters.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
50 files changed:
ftests/001-cgget-basic_cgget_v1.py
ftests/002-cgdelete-recursive_delete.py
ftests/003-cgget-basic_cgget_v2.py
ftests/004-cgsnapshot-basic_snapshot_v1.py
ftests/005-cgsnapshot-basic_snapshot_v2.py
ftests/006-cgrules-basic_cgrules_v1.py
ftests/007-cgrules-basic_cgrules_v2.py
ftests/008-cgget-multiple_r_flags.py
ftests/009-cgget-g_flag_controller_only.py
ftests/010-cgget-g_flag_controller_and_cgroup.py
ftests/011-cgget-r_flag_two_cgroups.py
ftests/012-cgget-multiple_r_flags2.py
ftests/013-cgget-multiple_g_flags.py
ftests/014-cgget-a_flag.py
ftests/015-cgget-multiline_r_flag.py
ftests/016-cgget-invalid_options.py
ftests/017-cgconfig-load_file.py
ftests/018-cgconfig-load_dir.py
ftests/019-cgconfig-uidgid_dperm_fperm.py
ftests/020-cgconfig-tasks_perms_owner.py
ftests/021-cgconfig-invalid_options.py
ftests/022-cgset-multiple_r_flag.py
ftests/023-cgset-copy_from.py
ftests/025-cgset-multiple_cgroups.py
ftests/026-cgset-multiple_r_multiple_cgroup.py
ftests/027-cgset-invalid_options.py
ftests/029-lssubsys-basic_lssubsys.py
ftests/030-lssubsys-lssubsys_all.py
ftests/031-lscgroup-g_flag.py
ftests/032-lscgroup-multiple_g_flags.py
ftests/033-cgget-no_flags.py
ftests/034-cgexec-basic_cgexec.py
ftests/035-cgset-set_cgroup_type.py
ftests/036-cgset-multi_thread.py
ftests/037-cgxget-cpu_settings.py
ftests/038-cgxget-cpuset_settings.py
ftests/039-pybindings-cgxget.py
ftests/040-pybindings-cgxset.py
ftests/041-pybindings-library_version.py
ftests/042-cgxget-unmappable.py
ftests/cgroup.py
ftests/config.py
ftests/consts.py
ftests/container.py
ftests/controller.py
ftests/ftests.py
ftests/log.py
ftests/process.py
ftests/run.py
ftests/utils.py

index 1093c4924e3022f2ef453da46d82cdfef9db0249..d37f327339d0caa4d53f90b17a82f3800bcf0acd 100755 (executable)
@@ -70,3 +70,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 34dd28ff96922388de733e5d15b37ab405af4a83..a938759083fcf44f1ca6cb85c3f6649ca469e677 100755 (executable)
@@ -76,3 +76,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 9b1ecd234a5ce9eecb4bdfce3af559435a4c440a..1475e434d475da64a4a44ed62782a1917fc97f1a 100755 (executable)
@@ -70,3 +70,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 9af4ff8be7b720638ceee0cf3eb7268c2b7fe452..58b32141d967eb2a8e9675ba93d7484faadae374 100755 (executable)
@@ -120,3 +120,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index d99eaea1e3081114f19ce65ddbd56c4413c7b121..373e87bff58490a4f7ce05beb2de94c9c41c6b84 100755 (executable)
@@ -82,3 +82,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 53dfd89c13e6c99d09c7b3d6c82d9d3f2e84d9a7..bf1f93888c048acde3393ab62c0785454048e5e2 100755 (executable)
@@ -99,3 +99,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index d86cb055364822af73e95b5f637e4f5b14e04239..95ded7727aa366582f386684d0fdb3d6a6174cdd 100755 (executable)
@@ -97,3 +97,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 605fab1a5d34971c07ade9bb4140059ca0bf5676..b522f49153b996b000adb89519cfb499684313b3 100755 (executable)
@@ -106,3 +106,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 3055226b5869a460b2d34e9b8f27bef47caef044..388f553b1741b78b3e52963063a2a1c27586c132 100755 (executable)
@@ -111,3 +111,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 6c4f03b167588995d04833feb63a786bab98240f..f5d620438b2806e733cd1e5b7709b809f117db9c 100755 (executable)
@@ -116,3 +116,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index e4d5946c9c94c548b278433fad1eeb3995213bd4..e879d771819520da2d2bd82fae798bfb582b01d1 100755 (executable)
@@ -112,3 +112,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 5a12b79ef66bf4f79f684d55a14078852e55f54e..a70cb423a7fb6ebc02cfc7ff0787303eda59af87 100755 (executable)
@@ -113,3 +113,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 3f89ce6bd2e6e527b6c7757c5dffac862c876c15..cbb0c2f6b345881fce3b79d537a1ff2bc6d9efdf 100755 (executable)
@@ -131,3 +131,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 4d2f49cb8c7f4c6f9e977624f51825f54b73925f..102d440d32679c1fc49f0e2d5326c86c7ad52766 100755 (executable)
@@ -106,3 +106,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index fa2ca9b015e5c931834e5d1951e7c5691c21b084..38850a91d6c7d09fdede68c78be35aa129fbf4fe 100755 (executable)
@@ -84,3 +84,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 80ecc433225e63c7d7bc52e9321eb021a848fe6f..7abdaa6a9df25ffe4602f84edc8b789dd5fa4b59 100755 (executable)
@@ -201,3 +201,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 4083199541f1934dfa2d926d9dee56fb6b4ff3df..4a73f1ce42b322eb6142cdd7e9972f8444d99635 100755 (executable)
@@ -90,3 +90,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 5726a02f7f9a833f1fb436706011e331f0ed55a8..6c57c665b66f9c3877cd0016f5ab664244c5c8f0 100755 (executable)
@@ -112,3 +112,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index cd6c9dcb292135d4b9f87d9743f5adf3cf5fa16e..9f545ad6c3c3dc472fabe92c74f6c26622805ce4 100755 (executable)
@@ -136,3 +136,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index b4d22c0e0a35fb00c52b413d65f4985b60ef6b24..c82cf05a4509c50474b9c862bf6bfcc3724d419c 100755 (executable)
@@ -133,3 +133,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 2cc5b07fd063057c823ccd6ab4fc56c7a2b7da32..d3acda8d427fbdb4f5b72fa3850e029ef6a97b39 100755 (executable)
@@ -102,3 +102,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index eb9202e319aecd549262f5021f9d7568cd5fd66a..d43e62d9b485e30254100fbb7cf6285df7c16caa 100755 (executable)
@@ -75,3 +75,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index e34e7f029f7df42477ff16bfdee53cd333103b7c..3a7aac547d5332a2687294341c858ecafb2e5f35 100755 (executable)
@@ -79,3 +79,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index a11f560fe4722caa53aca9fbd22062b208831257..ea09c6d8b403d5d94025c55db74057dafbfd9b6f 100755 (executable)
@@ -76,3 +76,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 8c19400182b2d80d3a078cc6ff1cb55cae9dc0c6..997b0b8a5e2817970437b682974b5b2b872e24ee 100755 (executable)
@@ -79,3 +79,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index e7c88f0cd97fcd3c0ea29832faf885e93fe8249a..e5de8a188767e9e1c4f38d00bcbc008f5bd86811 100755 (executable)
@@ -165,3 +165,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index bab3edc16e0327a8fe96b95413e7dbf2d683851c..5e6c022dd9bc864240038e4112ecc98892a254c1 100755 (executable)
@@ -93,3 +93,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 355242d4d96ff7abad3432cd60def52c34d8530e..7c20fdb887d9f1e867ebbe84312ae7c8976587a8 100755 (executable)
@@ -100,3 +100,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 0b9dbc72f2cbc2a4e76f38ccd025a95b16c7ab31..f56b2d6862cea255ca327389a262c046d0adcc32 100755 (executable)
@@ -107,3 +107,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 9975d30e20b9712f0d0e0d03c0ee023cd6ebe70e..03f7c292c8fc86b146da23b0cf57b64775549576 100755 (executable)
@@ -125,3 +125,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 986594f844e56351c16f7bd7d9d661c43a30e157..92f3d8e48794d68fbebb4dfaba9daebef46cca24 100755 (executable)
@@ -75,3 +75,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 31ff5d2849e20803546da51161229a73d4576ab4..cb1819306d5e4279deb37880429b1dde8d1ec835 100755 (executable)
@@ -91,3 +91,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 4a32d3bf18f8fba5b4a77524ad3ec04e0a7c0e4f..6e0c95383f6c9146a693cf4867077c0dd2fa8968 100755 (executable)
@@ -83,3 +83,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index f12d56535be59bfed9d581ebf7001fa2fa200f45..592ed9b3a6afcb6c40010e2fce08337dc179ee7b 100755 (executable)
@@ -102,3 +102,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 27803819a7a45db5eb4e2ccc5f1d8a9c38f0383b..167d45ce79f942c3501571125e2feb8a1b03eb47 100755 (executable)
@@ -99,3 +99,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index ebed88efdca27b259770046213693a3b33d71597..9bee9e4dc09cd45cd2670928aa3df785a505d7ab 100755 (executable)
@@ -114,3 +114,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 04a1f9b566a7396d10d46c17b4b4748f52ab7399..ff6f72561946f4f3adc21af5878451dcd1c9df37 100755 (executable)
@@ -128,3 +128,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 849483ccc56a77f2915afbcd8203f6c96a5b831d..bad418ce7780c4e2aaa50f437396147d781da673 100755 (executable)
@@ -116,3 +116,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 8248f5394cda07b138cac2017f117e3d6bb794ec..ba31f13aef4db2ff2f1a0919ab7f7aa4412c8894 100755 (executable)
@@ -74,3 +74,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 0c48247ffc4f25dfc4bc4ced329936a24e340474..e96f51031963facf6a4e4fe64b8ac2e956d79dd8 100755 (executable)
@@ -77,3 +77,5 @@ if __name__ == '__main__':
     # this test was invoked directly.  run only it
     config.args.num = int(os.path.basename(__file__).split('-')[0])
     sys.exit(ftests.main(config))
+
+# vim: set et ts=4 sw=4:
index 327fb2a75eb5c3e22e5b95c938ada7a3e5d24e83..67989a24ae7f260dd654b1a3a9dbc5f5b471059f 100644 (file)
@@ -951,3 +951,5 @@ class Cgroup(object):
 class CgroupError(Exception):
     def __init__(self, message):
         super(CgroupError, self).__init__(message)
+
+# vim: set et ts=4 sw=4:
index dd9180323f33f933097e5be76be390401923f22c..b28da72fbad688688cf33ea3b99da952912ed2ee 100644 (file)
@@ -63,3 +63,5 @@ class ConfigError(Exception):
     def __str__(self):
         out_str = "ConfigError:\n\tmessage = {}".format(self.message)
         return out_str
+
+# vim: set et ts=4 sw=4:
index 8e4b60373bd264d9a3defd2f99441eda3b7c7d2c..79a89fb96cb2a732e0d6a0c693f737bf39d8eaf2 100644 (file)
@@ -45,3 +45,5 @@ TEST_FAILED = "failed"
 TEST_SKIPPED = "skipped"
 
 CGRULES_FILE = "/etc/cgrules.conf"
+
+# vim: set et ts=4 sw=4:
index 6c5bc1dc39f3ca2ba088e021d27ef46285cec425..375dfb979d03189687f0bce3cc9c7a1cb43026e7 100644 (file)
@@ -189,3 +189,5 @@ class ContainerError(Exception):
     def __str__(self):
         out_str = "ContainerError:\n\tmessage = {}".format(self.message)
         return out_str
+
+# vim: set et ts=4 sw=4:
index 917efa93d2b51d7544c7770194d2a0c3cd62fc36..2e7203b5aa09f051245f3a6f9bf6b4f1ea3ccbb0 100644 (file)
@@ -67,3 +67,5 @@ class Controller(object):
             return False
 
         return True
+
+# vim: set et ts=4 sw=4:
index cedf98dfe691d28a45a183cde3c9db7610fcf72e..0aeab25265211f5238e1283d7a8b51803813f974 100755 (executable)
@@ -351,3 +351,5 @@ def main(config):
 if __name__ == '__main__':
     config = parse_args()
     sys.exit(main(config))
+
+# vim: set et ts=4 sw=4:
index 2b10d8583c1f912bff6e3ff74277bbfa5e2b2c22..835a28c0f332958411b9d2e2a777dc9b2ccfaac2 100644 (file)
@@ -54,3 +54,5 @@ class Log(object):
     @staticmethod
     def log_debug(msg):
         Log.log("DEBUG: {}".format(msg), consts.LOG_DEBUG)
+
+# vim: set et ts=4 sw=4:
index 41727f5eadf9ce6bf8a90350df8c6ae15c96310c..12b2ee1b665052a604de5a226036a9348486e912 100644 (file)
@@ -249,3 +249,5 @@ class Process(object):
             return Process.__get_cgroup_v2(config, pid, controller)
 
         raise ValueError("get_cgroup() shouldn't reach this point")
+
+# vim: set et ts=4 sw=4:
index 7ab4e512086f2e56b50f9b80247190580db26d63..83fbc058e8c73fd14ce7529fd619ec31bddbeb13 100644 (file)
@@ -80,3 +80,5 @@ class RunError(Exception):
                   self.command, self.ret)
         out_str += "\n\tstdout = {}\n\tstderr = {}".format(self.stdout, self.stderr)
         return out_str
+
+# vim: set et ts=4 sw=4:
index f353017932567a32be5eab5b0b070bd3f75aca26..d237d858cff163e55a00b7f312b11ccb7f2dd7eb 100644 (file)
@@ -88,3 +88,5 @@ def get_file_permissions(config, filename):
         return config.container.run(cmd, shell_bool=True)
     else:
         return Run.run(cmd, shell_bool=True)
+
+# vim: set et ts=4 sw=4: