mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Merged revisions 74459 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74459 | benjamin.peterson | 2009-08-15 08:23:05 -0500 (Sat, 15 Aug 2009) | 9 lines Merged revisions 74457 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74457 | benjamin.peterson | 2009-08-15 08:16:38 -0500 (Sat, 15 Aug 2009) | 1 line #6707 fix a crash with dir() on an uninitialized module ........ ................
This commit is contained in:
parent
43226f8bd0
commit
044446b67c
3 changed files with 8 additions and 3 deletions
|
@ -1265,9 +1265,11 @@ _specialized_dir_module(PyObject *obj)
|
|||
if (PyDict_Check(dict))
|
||||
result = PyDict_Keys(dict);
|
||||
else {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s.__dict__ is not a dictionary",
|
||||
PyModule_GetName(obj));
|
||||
const char *name = PyModule_GetName(obj);
|
||||
if (name)
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s.__dict__ is not a dictionary",
|
||||
name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue