summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-06-23 03:18:22 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-06-23 03:18:22 +0000
commit08aa5c585b511cfaf97ced38f2b5f7fb96492203 (patch)
tree0f4bd1a0fffb2d60212ddcef642cf27abb3aaac5 /django/core
parent284c6ba44b2285904f4ad4ad90d0c123b888c906 (diff)
Fixed #4607 -- Tweaked checks for features missing in Python 2.3 to not assume
things Python does not guarantee. Patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/core/management.py b/django/core/management.py
index 213eb4602c..d8bf8ea00b 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -7,9 +7,10 @@ from optparse import OptionParser
from django.utils import termcolors
import os, re, shutil, sys, textwrap
-# For Python 2.3
-if not hasattr(__builtins__, 'set'):
- from sets import Set as set
+try:
+ set
+except NameError:
+ from sets import Set as set # Python 2.3 fallback
# For backwards compatibility: get_version() used to be in this module.
get_version = django.get_version