From ff1f423d29f431e732978ac44d2ad9d5a8917d17 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 25 Dec 2011 12:47:13 +0000 Subject: 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 --- django/utils/archive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'django/utils') diff --git a/django/utils/archive.py b/django/utils/archive.py index ea948fe44f..9c2d4ac01b 100644 --- a/django/utils/archive.py +++ b/django/utils/archive.py @@ -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) -- cgit v1.3