diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-09-09 18:15:43 +1000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-09-09 18:15:43 +1000 |
commit | 6f513ad341ea28d71f575a7878c96603adb064b3 (patch) | |
tree | 24145472b2ca2a6a4b65670c31df1cd64aecffde /apps/patchwork | |
parent | 0521d8b2e26242fa3a161df50b3f61b9a05ae0dd (diff) | |
download | patchwork-6f513ad341ea28d71f575a7878c96603adb064b3.tar.bz2 patchwork-6f513ad341ea28d71f575a7878c96603adb064b3.tar.xz |
Import hashlib in HashField.db_type
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork')
-rw-r--r-- | apps/patchwork/models.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index f354acb..b4161c7 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -192,6 +192,7 @@ class HashField(models.Field): def db_type(self): if self.hashlib: + import hashlib n_bytes = len(hashlib.new(self.algorithm).digest()) else: n_bytes = len(self.hash_constructor().digest()) |