X Tutup
Skip to content

mercurial.ui.ui objects expect sys.stderr to have a closed attribute. #87

@ikanobori

Description

@ikanobori

Although this attribute is document as not supported on all file objects mercurial.ui.ui objects which is the default object class for user wanrings and promts invokes sys.stderr.closed().

Under bpython sys.stderr is a bpython.cli.Repl object which does no have this method attribute.

eg.

#!python

>>> import  mercurial.ui
>>> ui = mercurial.ui.ui()
>>> ui.warn("foo")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib/pymodules/python2.5/mercurial/ui.py", line 313, in warn
    self.write_err(*msg)
  File "/usr/lib/pymodules/python2.5/mercurial/ui.py", line 234, in write_err
    if not sys.stdout.closed: sys.stdout.flush()
AttributeError: 'Repl' object has no attribute 'closed'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup