Removed rsplit() usage for python2.3 compatibility. Refs #3625.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
55c70238ed
commit
6af3409d98
|
@ -1354,12 +1354,13 @@ def load_data(fixture_labels, verbosity=1):
|
||||||
for fixture_dir in app_fixtures + list(settings.FIXTURE_DIRS) + ['']:
|
for fixture_dir in app_fixtures + list(settings.FIXTURE_DIRS) + ['']:
|
||||||
if verbosity > 1:
|
if verbosity > 1:
|
||||||
print "Checking %s for fixtures..." % humanize(fixture_dir)
|
print "Checking %s for fixtures..." % humanize(fixture_dir)
|
||||||
try:
|
parts = fixture_label.split('.')
|
||||||
fixture_name, format = fixture_label.rsplit('.', 1)
|
if len(parts) == 1:
|
||||||
formats = [format]
|
|
||||||
except ValueError:
|
|
||||||
fixture_name = fixture_label
|
fixture_name = fixture_label
|
||||||
formats = serializers.get_serializer_formats()
|
formats = serializers.get_serializer_formats()
|
||||||
|
else:
|
||||||
|
fixture_name, format = '.'.join(parts[:-1]), parts[-1]
|
||||||
|
formats = [format]
|
||||||
|
|
||||||
label_found = False
|
label_found = False
|
||||||
for format in formats:
|
for format in formats:
|
||||||
|
|
Loading…
Reference in New Issue