summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-07-21 22:16:50 +0100
committerLars Wirzenius <liw@liw.fi>2013-07-21 22:16:50 +0100
commit5121a6235463f97d60fd91f0ae40e0899142db6c (patch)
tree432c546c36404eaab5d80c4dcfe53359568f7983
parentf1f9c1a65f34c2798b4c8ac63c7a2ec689cdd25a (diff)
downloadcmdtest-5121a6235463f97d60fd91f0ae40e0899142db6c.tar.gz
Make --quiet win over --verbose
-rwxr-xr-xyarn11
1 files changed, 6 insertions, 5 deletions
diff --git a/yarn b/yarn
index 6845345..97d5354 100755
--- a/yarn
+++ b/yarn
@@ -89,11 +89,12 @@ class YarnRunner(cliapp.Application):
self.ts.error(msg)
def process_args(self, args):
- # Do we have tty? If not, turn on --verbose.
- try:
- open('/dev/tty', 'w')
- except IOError:
- self.settings['verbose'] = True
+ # Do we have tty? If not, turn on --verbose, unless --quiet.
+ if not self.settings['quiet']:
+ try:
+ open('/dev/tty', 'w')
+ except IOError:
+ self.settings['verbose'] = True
self.ts = ttystatus.TerminalStatus(period=0.001)
if not self.settings['quiet'] and not self.settings['verbose']: