Incompatibility with diff from bzrtools ('DiffWriter' object has no attribute 'isatty')
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Pager Plugin |
Fix Committed
|
Medium
|
Mark Lee |
Bug Description
$ bzr cdiff
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
commands.
File "/usr/lib/
return self.run(
File "/usr/lib/
colordiff(
File "/usr/lib/
get_
File "/home/
setup_pager()
File "/home/
if not sys.stdout.isatty() or not hasattr(os, 'fork'):
AttributeError: 'DiffWriter' object has no attribute 'isatty'
bzr 1.12 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'cdiff']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'pt_BR.UTF-8'
plugins:
avahi /usr/lib/
bisect /home/edcrypt/
bookmarks /home/edcrypt/
bzrtools /usr/lib/
dbus /usr/lib/
diffstat /home/edcrypt/
extcommand /home/edcrypt/
gtk /usr/lib/
launchpad /usr/lib/
local_branches /home/edcrypt/
netrc_
pager /home/edcrypt/
rxrenames /home/edcrypt/
search /home/edcrypt/
stats /home/edcrypt/
touch /home/edcrypt/
upload /home/edcrypt/
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
I have two fixes in my branch (<lp:~malept/bzr-pager/bugfix.329845>, linked to this bug). The first revision (r9) avoids using the pager if sys.stdout does not have the 'isatty' attribute (e.g., bzrtool's DiffWriter). The second revision (r10) enables proper support for `bzr cdiff` by detecting if sys.stdout is a DiffWriter.