projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7999bfb
)
Don't die if CodeType doesn't exist -- ignore the error. This could
author
Guido van Rossum
<guido@python.org>
Mon, 25 Jan 1999 21:37:02 +0000
(21:37 +0000)
committer
Guido van Rossum
<guido@python.org>
Mon, 25 Jan 1999 21:37:02 +0000
(21:37 +0000)
happen in restricted mode.
Lib/copy.py
patch
|
blob
|
history
diff --git
a/Lib/copy.py
b/Lib/copy.py
index b481d29db7f43bb18fefada0206aff3d5a59941b..2d9de3cad35ebf581d8e63df06ffb42ea23dd04b 100644
(file)
--- a/
Lib/copy.py
+++ b/
Lib/copy.py
@@
-85,7
+85,10
@@
d[types.IntType] = _copy_atomic
d[types.LongType] = _copy_atomic
d[types.FloatType] = _copy_atomic
d[types.StringType] = _copy_atomic
-d[types.CodeType] = _copy_atomic
+try:
+ d[types.CodeType] = _copy_atomic
+except AttributeError:
+ pass
d[types.TypeType] = _copy_atomic
d[types.XRangeType] = _copy_atomic
d[types.ClassType] = _copy_atomic