From e41579126ac5b546b56373de8d7ba32571a5e6b3 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Sat, 2 Feb 2013 13:06:27 +0100 Subject: [PATCH] hv_lxc: fix whitespace errors The latest lxc patches included a few whitespace style errors, that make lint fail. This patch fixes those. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> --- lib/hypervisor/hv_lxc.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/hypervisor/hv_lxc.py b/lib/hypervisor/hv_lxc.py index d7deee8d4..f080640cc 100644 --- a/lib/hypervisor/hv_lxc.py +++ b/lib/hypervisor/hv_lxc.py @@ -149,8 +149,8 @@ class LXCHypervisor(hv_base.BaseHypervisor): cgroup = cls._GetCgroupMountPoint() try: memory = int(utils.ReadFile(utils.PathJoin(cgroup, 'lxc', - instance_name, - "memory.limit_in_bytes"))) + instance_name, + "memory.limit_in_bytes"))) except EnvironmentError: # memory resource controller may be disabled, ignore memory = 0 @@ -161,7 +161,7 @@ class LXCHypervisor(hv_base.BaseHypervisor): """Get the list of running instances. """ - return [ iinfo[0] for iinfo in self.GetAllInstancesInfo() ] + return [iinfo[0] for iinfo in self.GetAllInstancesInfo()] def GetInstanceInfo(self, instance_name): """Get instance properties. @@ -249,12 +249,12 @@ class LXCHypervisor(hv_base.BaseHypervisor): # Conditionally enable, memory resource controller might be disabled cgroup = self._GetCgroupMountPoint() if os.path.exists(utils.PathJoin(cgroup, 'memory.limit_in_bytes')): - out.append("lxc.cgroup.memory.limit_in_bytes = %dM" % - instance.beparams[constants.BE_MAXMEM]) + out.append("lxc.cgroup.memory.limit_in_bytes = %dM" % + instance.beparams[constants.BE_MAXMEM]) if os.path.exists(utils.PathJoin(cgroup, 'memory.memsw.limit_in_bytes')): - out.append("lxc.cgroup.memory.memsw.limit_in_bytes = %dM" % - instance.beparams[constants.BE_MAXMEM]) + out.append("lxc.cgroup.memory.memsw.limit_in_bytes = %dM" % + instance.beparams[constants.BE_MAXMEM]) # Device control # deny direct device access @@ -355,7 +355,7 @@ class LXCHypervisor(hv_base.BaseHypervisor): result.output) if not os.path.ismount(root_dir): - return + return for mpath in self._GetMountSubdirs(root_dir): result = utils.RunCmd(["umount", mpath]) -- GitLab