Commit 555d12f9 authored by Guido van Rossum's avatar Guido van Rossum

softspace(): be prepared to catch AttributeError as well as TypeError

upon attempted attribute assignment.  Caught by MWH, SF bug #462522.
parent 22cd7681
......@@ -20,7 +20,8 @@ def softspace(file, newvalue):
pass
try:
file.softspace = newvalue
except TypeError: # "attribute-less object" or "read-only attributes"
except (AttributeError, TypeError):
# "attribute-less object" or "read-only attributes"
pass
return oldvalue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment