This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix for formatter.py
Type: Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, skomoroh
Priority: normal Keywords: patch

Created on 2008-09-07 07:46 by skomoroh, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
formatter.patch skomoroh, 2008-09-07 07:46
Messages (2)
msg72735 - (view) Author: (skomoroh) Date: 2008-09-07 07:46
Code:
import formatter
w = formatter.DumbWriter()
f = formatter.AbstractFormatter(w)
f.push_margin('dd')
f.pop_margin()

Result:
Traceback (most recent call last):
  File "formatter_test.py", line 7, in <module>
    f.push_margin('dd')
  File "/usr/local/lib/python3.0/formatter.py", line 261, in push_margin
    self.writer.new_margin(margin, len(fstack))
TypeError: object of type 'filter' has no len()

I've attached the trivial patch for fix it.
msg72899 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-09-09 19:32
Thanks, fixed in r66348.
History
Date User Action Args
2022-04-11 14:56:38adminsetgithub: 48050
2008-09-09 19:32:09georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg72899
nosy: + georg.brandl
2008-09-07 07:46:31skomorohcreate