Changeset 9537
- Timestamp:
- 11/30/08 20:20:59 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/management/commands/loaddata.py
r9531 r9537 10 10 except NameError: 11 11 from sets import Set as set # Python 2.3 fallback 12 13 try: 14 import bz2 15 has_bz2 = True 16 except ImportError: 17 has_bz2 = False 12 18 13 19 class Command(BaseCommand): … … 63 69 compression_types = { 64 70 None: file, 65 'bz2': bz2.BZ2File,66 71 'gz': gzip.GzipFile, 67 72 'zip': SingleZipReader 68 73 } 74 if has_bz2: 75 compression_types['bz2'] = bz2.BZ2File 69 76 70 77 app_fixtures = [os.path.join(os.path.dirname(app.__file__), 'fixtures') for app in get_apps()]
