24499016 warning message for invalid action type should go to stderr s12b107
authorMingrui Lyu <mingrui.lyu@oracle.com>
Mon, 22 Aug 2016 10:47:25 -0700
changeset 3413 8abc77270dcf
parent 3412 15f72090b522
child 3414 6b0bee75ca66
24499016 warning message for invalid action type should go to stderr
src/client.py
src/tests/cli/t_pkg_contents.py
--- a/src/client.py	Fri Aug 26 19:23:52 2016 +1000
+++ b/src/client.py	Mon Aug 22 10:47:25 2016 -0700
@@ -3309,8 +3309,8 @@
                         usage(_("no valid action types specified"),
                             cmd=subcommand)
                 elif invalid_atype:
-                        msg(_("""\
-WARNING: invalid action types specified:{0}
+                        emsg(_("""\
+WARNING: invalid action types specified: {0}
 """.format(",".join(invalid_atype))))
 
         check_attrs(attrs, subcommand)
--- a/src/tests/cli/t_pkg_contents.py	Fri Aug 26 19:23:52 2016 +1000
+++ b/src/tests/cli/t_pkg_contents.py	Mon Aug 22 10:47:25 2016 -0700
@@ -114,8 +114,9 @@
                 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=0)
+                self.pkg("contents -t falseaction,file")
                 self.assertTrue("PATH" in self.output)
+                self.assertTrue("falseaction" in self.errout)
 
         def test_contents_empty_image(self):
                 """local pkg contents should fail in an empty image; remote