X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=blobdiff_plain;f=cgroups.py;h=43a549dec695f48b5bd0f7e29de6a9937bc29273;hp=7ccbf0bdb7a005b8dcb723a3e191f4b73cce721e;hb=1eccb35fa24dc6b7a8aa6a8922be2e776b8cc33e;hpb=430195a2b1382182d28dbcd16b21864ed758f52d diff --git a/cgroups.py b/cgroups.py index 7ccbf0b..43a549d 100644 --- a/cgroups.py +++ b/cgroups.py @@ -98,12 +98,14 @@ def write(name, key, value, subsystem="cpuset"): base_path = get_cgroup_path(name, subsystem) with open(os.path.join(base_path, key), 'w') as f: print >>f, value + logger.verbose("cgroups.write: overwrote {}".format(base_path)) def append(name, key, value, subsystem="cpuset"): """ Appends a value to the file key with the cgroup with name """ base_path = get_cgroup_path(name, subsystem) with open(os.path.join(base_path, key), 'a') as f: print >>f, value + logger.verbose("cgroups.append: appended {}".format(base_path)) if __name__ == '__main__':