--- a/src/client.py Fri Aug 19 15:04:45 2016 -0700
+++ b/src/client.py Fri Aug 19 21:44:25 2016 -0700
@@ -3301,10 +3301,17 @@
usage(_("-m and {0} may not be specified at the same "
"time").format(invalid.pop()), cmd=subcommand)
- if action_types and all(
- atype not in default_attrs
- for atype in action_types):
- usage(_("no valid action types specified"), cmd=subcommand)
+ if action_types:
+ invalid_atype = [atype
+ for atype in action_types
+ if atype not in default_attrs]
+ if invalid_atype == action_types:
+ usage(_("no valid action types specified"),
+ cmd=subcommand)
+ elif invalid_atype:
+ msg(_("""\
+WARNING: invalid action types specified:{0}
+""".format(",".join(invalid_atype))))
check_attrs(attrs, subcommand)
--- a/src/tests/cli/t_pkg_contents.py Fri Aug 19 15:04:45 2016 -0700
+++ b/src/tests/cli/t_pkg_contents.py Fri Aug 19 21:44:25 2016 -0700
@@ -114,7 +114,7 @@
self.assertTrue("LICENSE" in self.output and "NAME" in self.output
and "VALUE" in self.output)
self.pkg("contents -t falseaction", exit=2)
- self.pkg("contents -t falseaction,file", exit=1)
+ self.pkg("contents -t falseaction,file", exit=0)
self.assertTrue("PATH" in self.output)
def test_contents_empty_image(self):