summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-07 12:15:40 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-07 12:15:40 +0000
commit6af3409d98ce2a025b69666cd503d85e2f081e8d (patch)
tree18af84a1551b7b651f7eeb0631a0af1c4afb26c9 /django
parent55c70238ed0e58091b5c6c24e2d39655acb4dcca (diff)
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
Diffstat (limited to 'django')
-rw-r--r--django/core/management.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/django/core/management.py b/django/core/management.py
index 0a04a7e830..21d867f2c5 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -1354,13 +1354,14 @@ def load_data(fixture_labels, verbosity=1):
for fixture_dir in app_fixtures + list(settings.FIXTURE_DIRS) + ['']:
if verbosity > 1:
print "Checking %s for fixtures..." % humanize(fixture_dir)
- try:
- fixture_name, format = fixture_label.rsplit('.', 1)
- formats = [format]
- except ValueError:
+ parts = fixture_label.split('.')
+ if len(parts) == 1:
fixture_name = fixture_label
formats = serializers.get_serializer_formats()
-
+ else:
+ fixture_name, format = '.'.join(parts[:-1]), parts[-1]
+ formats = [format]
+
label_found = False
for format in formats:
serializer = serializers.get_serializer(format)