minor cleanup
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 13 Mar 2015 11:01:19 +0000 (12:01 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 13 Mar 2015 11:01:19 +0000 (12:01 +0100)
account.py
cgroups.py

index 293fc3f..b1956d3 100644 (file)
@@ -98,8 +98,8 @@ class Account:
         """
         Write <rec['keys']> 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]
index cbdfbe2..b665889 100644 (file)
@@ -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"