mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed a few tests to run on Python 2.5. Thanks, Florian Apolloner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -141,7 +141,7 @@ class TarArchive(BaseArchive): | ||||
|                 name = self.split_leading_dir(name)[1] | ||||
|             filename = os.path.join(to_path, name) | ||||
|             if member.isdir(): | ||||
|                 if not os.path.exists(filename): | ||||
|                 if filename and not os.path.exists(filename): | ||||
|                     os.makedirs(filename) | ||||
|             else: | ||||
|                 try: | ||||
| @@ -153,7 +153,7 @@ class TarArchive(BaseArchive): | ||||
|                            (name, member.name, sys.exc_info()[1])) | ||||
|                 else: | ||||
|                     dirname = os.path.dirname(filename) | ||||
|                     if not os.path.exists(dirname): | ||||
|                     if dirname and not os.path.exists(dirname): | ||||
|                         os.makedirs(dirname) | ||||
|                     with open(filename, 'wb') as outfile: | ||||
|                         shutil.copyfileobj(extracted, outfile) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user