[Python-checkins] CVS: python/dist/src/Lib code.py,1.17,1.18
Guido van Rossum
gvanrossum@users.sourceforge.net
Tue, 18 Sep 2001 06:33:03 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv12889
Modified Files:
code.py
Log Message:
softspace(): be prepared to catch AttributeError as well as TypeError
upon attempted attribute assignment. Caught by MWH, SF bug #462522.
Index: code.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/code.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** code.py 2001/08/17 22:11:27 1.17
--- code.py 2001/09/18 13:33:01 1.18
***************
*** 21,25 ****
try:
file.softspace = newvalue
! except TypeError: # "attribute-less object" or "read-only attributes"
pass
return oldvalue
--- 21,26 ----
try:
file.softspace = newvalue
! except (AttributeError, TypeError):
! # "attribute-less object" or "read-only attributes"
pass
return oldvalue