Lint and style

This commit is contained in:
Thomas S Hatch 2014-04-29 22:33:55 -06:00
parent 8a119b4ec6
commit 89a4c6bd24
2 changed files with 9 additions and 3 deletions

View File

@ -46,7 +46,7 @@ def _do_names(names, fun):
Invoke a function in the lxc module with no args
'''
ret = {}
hosts = find_guests(names, quiet=True)
hosts = find_guests(names)
if not hosts:
return False

View File

@ -2201,11 +2201,17 @@ def get_gid_list(user=None, include_default=True):
return sorted(set(gid_list))
def trim_dict(data, max_dict_bytes, percent=50.0, stepper_size=10, replace_with='VALUE_TRIMMED', is_msgpacked=False):
def trim_dict(
data,
max_dict_bytes,
percent=50.0,
stepper_size=10,
replace_with='VALUE_TRIMMED',
is_msgpacked=False):
'''
Takes a dictionary and iterates over its keys, looking for
large values and replacing them with a trimmed string.
If after the first pass over dictionary keys, the dictionary
is not sufficiently small, the stepper_size will be increased
and the dictionary will be rescanned. This allows for progressive