diff options
author | Daniel Axtens <dja@axtens.net> | 2019-08-30 17:36:43 +1000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2020-04-08 23:30:49 +0100 |
commit | 64d11912e2bd4f6af72fd23a7656b9a347536732 (patch) | |
tree | 0e3ad787b9e9d1bc4158b8c9f66270dbfee3a003 /patchwork/fields.py | |
parent | 438cba6d1cb7517432cab6f0ee6adfb84f53def4 (diff) | |
download | patchwork-64d11912e2bd4f6af72fd23a7656b9a347536732.tar patchwork-64d11912e2bd4f6af72fd23a7656b9a347536732.tar.gz |
Clean up references to Python 2.7, Python 3.5
Both this and the version of Django we were running with it are EOL
upstream. It's time to drop them.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'patchwork/fields.py')
-rw-r--r-- | patchwork/fields.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patchwork/fields.py b/patchwork/fields.py index dd29ea0..6eca1a2 100644 --- a/patchwork/fields.py +++ b/patchwork/fields.py @@ -7,7 +7,6 @@ import hashlib from django.db import models -from django.utils import six class HashField(models.CharField): @@ -19,7 +18,8 @@ class HashField(models.CharField): super(HashField, self).__init__(*args, **kwargs) def construct(self, value): - if isinstance(value, six.text_type): + # TODO: should this be unconditional? + if isinstance(value, str): value = value.encode('utf-8') return hashlib.sha1(value) |