mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Merged revisions 87960 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87960 | benjamin.peterson | 2011-01-12 12:56:07 -0600 (Wed, 12 Jan 2011) | 1 line use PyErr_SetString instead of PyErr_Format ........
This commit is contained in:
		
							parent
							
								
									b633eab98e
								
							
						
					
					
						commit
						a53d2acb3d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -326,7 +326,7 @@ type_abstractmethods(PyTypeObject *type, void *context)
 | 
			
		|||
    if (type != &PyType_Type)
 | 
			
		||||
        mod = PyDict_GetItemString(type->tp_dict, "__abstractmethods__");
 | 
			
		||||
    if (!mod) {
 | 
			
		||||
        PyErr_Format(PyExc_AttributeError, "__abstractmethods__");
 | 
			
		||||
        PyErr_SetString(PyExc_AttributeError, "__abstractmethods__");
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
    Py_XINCREF(mod);
 | 
			
		||||
| 
						 | 
				
			
			@ -347,7 +347,7 @@ type_set_abstractmethods(PyTypeObject *type, PyObject *value, void *context)
 | 
			
		|||
    else {
 | 
			
		||||
        res = PyDict_DelItemString(type->tp_dict, "__abstractmethods__");
 | 
			
		||||
        if (res && PyErr_ExceptionMatches(PyExc_KeyError)) {
 | 
			
		||||
            PyErr_Format(PyExc_AttributeError, "__abstractmethods__", value);
 | 
			
		||||
            PyErr_SetString(PyExc_AttributeError, "__abstractmethods__");
 | 
			
		||||
            return -1;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue