mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Reverted (partially) patch r62667 to zipimport.c.
test_pkgutil and test_zipimport are failing on the amd64-gentoo buildbot due to a yet unknown change introduced by r62667. To find out what is causing the failure, I am reverting partially r62667.
This commit is contained in:
		
							parent
							
								
									9ea0117500
								
							
						
					
					
						commit
						ec924c995c
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -61,14 +61,15 @@ static int
 | 
				
			||||||
zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
 | 
					zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char *path, *p, *prefix, buf[MAXPATHLEN+2];
 | 
						char *path, *p, *prefix, buf[MAXPATHLEN+2];
 | 
				
			||||||
	Py_ssize_t len;
 | 
						size_t len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!_PyArg_NoKeywords("zipimporter()", kwds))
 | 
						if (!_PyArg_NoKeywords("zipimporter()", kwds))
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!PyArg_ParseTuple(args, "s#:zipimporter", &path, &len))
 | 
						if (!PyArg_ParseTuple(args, "s:zipimporter", &path))
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						len = strlen(path);
 | 
				
			||||||
	if (len == 0) {
 | 
						if (len == 0) {
 | 
				
			||||||
		PyErr_SetString(ZipImportError, "archive path is empty");
 | 
							PyErr_SetString(ZipImportError, "archive path is empty");
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue