diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-12-25 12:47:13 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-12-25 12:47:13 +0000 |
| commit | ff1f423d29f431e732978ac44d2ad9d5a8917d17 (patch) | |
| tree | 5c23293a626ce1cc461d4a4884d266ed0812bb24 /django | |
| parent | 4403ce10b75b4b399064eccb960f9f38c796431d (diff) | |
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
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/archive.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
