/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-10-22 16:27:21 UTC
  • mfrom: (4765.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20091022162721-r0to3zua8p8oprq1
(jam, vila) More complete fix for terminal_width

Show diffs side-by-side

added added

removed removed

Lines of Context:
1296
1296
 
1297
1297
def terminal_width():
1298
1298
    """Return estimated terminal width."""
1299
 
    if getattr(sys.stdout, 'isatty', None) is None:
 
1299
    isatty = getattr(sys.stdout, 'isatty', None)
 
1300
    if  isatty is None or not isatty():
1300
1301
        # If it's not a tty, the width makes no sense. We just use a value bug
1301
1302
        # enough to avoid truncations. When the output is redirected, the
1302
1303
        # pagers can then handle that themselves. A cleaner implementation