mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	time.strftime(): replace PyErr_Format() by PyErr_SetString()
The argument was not used in the format string.
This commit is contained in:
		
							parent
							
								
									13ed2ea7a2
								
							
						
					
					
						commit
						6f0e4f99ab
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -476,9 +476,8 @@ time_strftime(PyObject *self, PyObject *args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(_MSC_VER) || defined(sun)
 | 
					#if defined(_MSC_VER) || defined(sun)
 | 
				
			||||||
    if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
 | 
					    if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
 | 
				
			||||||
        PyErr_Format(PyExc_ValueError,
 | 
					        PyErr_SetString(PyExc_ValueError,
 | 
				
			||||||
                     "strftime() requires year in [1; 9999]",
 | 
					                        "strftime() requires year in [1; 9999]");
 | 
				
			||||||
                     buf.tm_year + 1900);
 | 
					 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue