From: Thierry Parmentelat Date: Fri, 13 Mar 2015 11:01:19 +0000 (+0100) Subject: minor cleanup X-Git-Tag: nodemanager-5.2-16~10 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=e7b8a9d95fe29760aa84f23cde8c136592c92f38 minor cleanup --- diff --git a/account.py b/account.py index 293fc3f..b1956d3 100644 --- a/account.py +++ b/account.py @@ -98,8 +98,8 @@ class Account: """ Write to my authorized_keys file. """ - logger.verbose('account: configuring %s' % self.name) new_keys = rec['keys'] + logger.verbose('account: configuring {} with {} keys'.format(self.name, len(new_keys))) if new_keys != self.keys: # get the unix account info gid = grp.getgrnam("slices")[2] diff --git a/cgroups.py b/cgroups.py index cbdfbe2..b665889 100644 --- a/cgroups.py +++ b/cgroups.py @@ -71,7 +71,7 @@ def get_cgroup_paths(subsystem="cpuset"): def get_cgroup_path(name, subsystem="cpuset"): """ Returns the base path for the cgroup with a specific name or None.""" result = reduce(lambda a, b: b if os.path.basename(b) == name else a, - get_cgroup_paths(subsystem), None) + get_cgroup_paths(subsystem), None) if result is None: name = name + ".libvirt-lxc"