mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
New error handling in getattr().
This commit is contained in:
parent
0539ba2c74
commit
2b654f74c2
2 changed files with 5 additions and 5 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "fileobject.h"
|
||||
#include "methodobject.h"
|
||||
#include "objimpl.h"
|
||||
#include "errors.h"
|
||||
|
||||
typedef struct {
|
||||
OB_HEAD
|
||||
|
@ -248,7 +249,7 @@ filegetattr(f, name)
|
|||
return newmethodobject(ml->ml_name, ml->ml_meth,
|
||||
(object *)f);
|
||||
}
|
||||
errno = ESRCH;
|
||||
err_setstr(NameError, name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue