]> git.ipfire.org Git - thirdparty/patchwork.git/commit
fields: Simplify HashField
authorStephen Finucane <stephen.finucane@intel.com>
Fri, 11 Mar 2016 18:31:01 +0000 (18:31 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Wed, 16 Mar 2016 09:28:00 +0000 (09:28 +0000)
commit16f3f9b0f881e2660603c57e7fd7ac648ab44fd1
tree3da26b3763ad4261480f14f6dc02a1384ba6a9a5
parent908f2022f2f2de70a1b09e25b62992ebada4a2c9
fields: Simplify HashField

The HashField was written to be configurable. It supports customisable
hash types and provides fallbacks for a missing 'hashlib', which was
only introduced in Python 2.5. However, the customisable hash types
are not used anywhere (the actual hashing is hardcoded to use 'sha1')
and Python 2.7/3.3+ are the only versions of Python currently
supported. As a result, it is possible to remove much of the code
without losing any real functionality. Do this.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
patchwork/fields.py