The "Checking for changes..." message should only be printed if stdout
is a TTY to avoid unnecessary information for people redirecting the
output to a file.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
noexclude = True, verbose = False):
"""Returns a list of pairs - [status, filename]
"""
noexclude = True, verbose = False):
"""Returns a list of pairs - [status, filename]
"""
- if verbose:
- print >> sys.stderr, \
- 'Checking for changes in the working directory...',
- sys.stderr.flush()
+ if verbose and sys.stdout.isatty():
+ print 'Checking for changes in the working directory...',
+ sys.stdout.flush()
if fs[1] not in conflicts:
cache_files.append(fs)
if fs[1] not in conflicts:
cache_files.append(fs)
- if verbose:
- print >> sys.stderr, 'done'
+ if verbose and sys.stdout.isatty():
+ print 'done'