From: Stéphane Graber Date: Fri, 2 May 2014 15:16:51 +0000 (-0400) Subject: lxc-ls: Allow the use of --groups without --fancy X-Git-Tag: lxc-1.1.0.alpha1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9abc183b177212db8b46a1419ce7bc62ad838ce;p=thirdparty%2Flxc.git lxc-ls: Allow the use of --groups without --fancy There wasn't a good reason for that limit, we can simply make the code slightly slower when --groups is passed and still have the expected output even without --fancy. Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in index a165166d9..64dd12193 100755 --- a/src/lxc/lxc-ls.in +++ b/src/lxc/lxc-ls.in @@ -194,10 +194,6 @@ if args.nesting: parser.error(_("Showing nested containers requires setns to the " "PID namespace which your kernel doesn't support.")) -## Check that -g is passed alongside -f -if args.groups and not args.fancy: - parser.error(_("Group filtering requires fancy formatting.")) - # Set the actual lxcpath value if not args.lxcpath: args.lxcpath = lxc.default_config_path @@ -229,7 +225,8 @@ def get_containers(fd=None, base="/", root=False): continue # Return before grabbing the object (non-root) - if not args.state and not args.fancy and not args.nesting: + if not args.state and not args.fancy and not args.nesting \ + and not args.groups: containers.append(entry) continue