diff options
author | Mathieu Bridon <bochecha@daitauha.fr> | 2017-11-02 16:20:55 +0800 |
---|---|---|
committer | Mathieu Bridon <bochecha@daitauha.fr> | 2017-11-03 14:35:21 +0800 |
commit | f330024d640f340e92ea221ff26a343bf26a0115 (patch) | |
tree | 9b47e541b5e9e4d40578fe74711897fcdb616a1b /tests/testutils/repo | |
parent | 557a08d0b3f6101f8452cce25096b310de0f596e (diff) | |
download | buildstream-f330024d640f340e92ea221ff26a343bf26a0115.tar.gz |
tests: Reuse utils.sha256sum
The utility function was added in 08da7cc7, but it never was removed
from here.
Diffstat (limited to 'tests/testutils/repo')
-rw-r--r-- | tests/testutils/repo/tar.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/testutils/repo/tar.py b/tests/testutils/repo/tar.py index b9cec97b6..158a04891 100644 --- a/tests/testutils/repo/tar.py +++ b/tests/testutils/repo/tar.py @@ -2,6 +2,8 @@ import os import tarfile import hashlib +from buildstream.utils import sha256sum + from .repo import Repo @@ -30,11 +32,3 @@ class Tar(Repo): config['ref'] = ref return config - - -def sha256sum(filename): - h = hashlib.sha256() - with open(filename, "rb") as f: - for chunk in iter(lambda: f.read(4096), b""): - h.update(chunk) - return h.hexdigest() |