Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
df71dcbe
Commit
df71dcbe
authored
Jun 26, 2014
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't overwrite the error from PyObject_GetAttrString (closes #4346)
parent
e75f527b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
Misc/NEWS
Misc/NEWS
+3
-0
Objects/abstract.c
Objects/abstract.c
+4
-8
No files found.
Misc/NEWS
View file @
df71dcbe
...
...
@@ -10,6 +10,9 @@ What's New in Python 2.7.8?
Core and Builtins
-----------------
- Issue #4346: In PyObject_CallMethod and PyObject_CallMethodObjArgs, don'
t
overwrite
the
error
set
in
PyObject_GetAttr
.
-
Issue
#
21831
:
Avoid
integer
overflow
when
large
sizes
and
offsets
are
given
to
the
buffer
type
.
...
...
Objects/abstract.c
View file @
df71dcbe
...
...
@@ -2617,10 +2617,8 @@ PyObject_CallMethod(PyObject *o, char *name, char *format, ...)
return
null_error
();
func
=
PyObject_GetAttrString
(
o
,
name
);
if
(
func
==
NULL
)
{
PyErr_SetString
(
PyExc_AttributeError
,
name
);
return
0
;
}
if
(
func
==
NULL
)
return
NULL
;
if
(
!
PyCallable_Check
(
func
))
{
type_error
(
"attribute of type '%.200s' is not callable"
,
func
);
...
...
@@ -2656,10 +2654,8 @@ _PyObject_CallMethod_SizeT(PyObject *o, char *name, char *format, ...)
return
null_error
();
func
=
PyObject_GetAttrString
(
o
,
name
);
if
(
func
==
NULL
)
{
PyErr_SetString
(
PyExc_AttributeError
,
name
);
return
0
;
}
if
(
func
==
NULL
)
return
NULL
;
if
(
!
PyCallable_Check
(
func
))
{
type_error
(
"attribute of type '%.200s' is not callable"
,
func
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment