logging: Change default log level of cros commands.
Change the default log level of cros commands to notice from
info.
Change operation.ProgressBar() to not display a progress bar if
not in a terminal.
BUG=none
TEST=unittests
Change-Id: I6762525b5688904b7d80d18bc9fa293ac77efcbb
Reviewed-on: https://chromium-review.googlesource.com/272268
Reviewed-by: Yiming Chen <yimingc@chromium.org>
Commit-Queue: Ralph Nathan <ralphnathan@chromium.org>
Trybot-Ready: Ralph Nathan <ralphnathan@chromium.org>
Tested-by: Ralph Nathan <ralphnathan@chromium.org>
diff --git a/scripts/cros_unittest.py b/scripts/cros_unittest.py
index ffe9bad..4a46b28 100644
--- a/scripts/cros_unittest.py
+++ b/scripts/cros_unittest.py
@@ -50,8 +50,8 @@
arg_parser.assert_called_with(caching=True, default_log_level='notice')
def testDefaultLogLevelCros(self):
- """Test that the default log level is not set to notice for cros tools."""
+ """Test that the default log level is set to notice for cros tools."""
arg_parser = self.PatchObject(commandline, 'ArgumentParser',
return_value=commandline.ArgumentParser())
cros.GetOptions({})
- arg_parser.assert_called_with(caching=True)
+ arg_parser.assert_called_with(caching=True, default_log_level='notice')