diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2009-06-14 23:03:01 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2009-06-14 23:03:01 +0000 |
| commit | c98a46c2be042620f28719824fc5d9dfffbef652 (patch) | |
| tree | 02cc3556302ef20d66dbb7d5856f0c3a6aa72e50 | |
| parent | 694a15ef72afbd5994ca83b20c59aa7ec3d24d3d (diff) | |
Fixed #11316 -- Fixed a Python 2.3 compatibilty issue with [10966] (in Python 2.3 on 32-bit machines, 1<<32 is 0). Thanks to kylef for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/backends/creation.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py index 53874f9f73..1ac75426c1 100644 --- a/django/db/backends/creation.py +++ b/django/db/backends/creation.py @@ -26,8 +26,11 @@ class BaseDatabaseCreation(object): self.connection = connection def _digest(self, *args): - "Generate a 32 bit digest of a set of arguments that can be used to shorten identifying names" - return '%x' % (abs(hash(args)) % (1<<32)) + """ + Generates a 32-bit digest of a set of arguments that can be used to + shorten identifying names. + """ + return '%x' % (abs(hash(args)) % 4294967296L) # 2**32 def sql_create_model(self, model, style, known_models=set()): """ |
