Skip to content

Commit

Permalink
Fixed #11316 -- Fixed a Python 2.3 compatibilty issue with [10966] (i…
Browse files Browse the repository at this point in the history
…n 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
  • Loading branch information
gdub committed Jun 14, 2009
1 parent 694a15e commit c98a46c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions django/db/backends/creation.py
Expand Up @@ -26,8 +26,11 @@ def __init__(self, connection):
self.connection = connection self.connection = connection


def _digest(self, *args): 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()): def sql_create_model(self, model, style, known_models=set()):
""" """
Expand Down

0 comments on commit c98a46c

Please sign in to comment.