]> git.ipfire.org Git - pbs.git/commitdiff
misc: Drop unused functions
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Jul 2022 11:40:27 +0000 (11:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Jul 2022 11:40:27 +0000 (11:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/misc.py

index 5c331b580a3567108359985397c958d41befafe1..5d36d8e1bb88da13158b6fc32bd4dad735a4746c 100644 (file)
@@ -1,14 +1,10 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
-import hashlib
-import os
 import random
 import re
 import string
 import unicodedata
 
-from .constants import *
-
 # A list of possible random characters.
 random_chars = string.ascii_letters + string.digits
 
@@ -83,20 +79,3 @@ def friendly_time(t):
                ret.append("%s s" % t)
 
        return " ".join(ret)
-
-def calc_hash(filename, algo="sha512"):
-       assert algo in hashlib.algorithms
-
-       f = open(filename, "rb")
-       h = hashlib.new(algo)
-
-       while True:
-               buf = f.read(BUFFER_SIZE)
-               if not buf:
-                       break
-
-               h.update(buf)
-
-       f.close()
-
-       return h.hexdigest()