summaryrefslogtreecommitdiff
path: root/django/core/management.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/management.py')
-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