Replace use of deprecated sha module

This commit is contained in:
Jean-Paul Calderone 2018-04-26 14:57:45 -04:00
parent be0317632f
commit cc6006dcb3

View File

@ -1,6 +1,6 @@
#! /usr/bin/env python
import sha as shamodule
import hashlib
import os, random
from pkg_resources import require
@ -10,7 +10,7 @@ from pyrrd.rrd import DataSource, RRD, RRA
def sha(s):
return shamodule.new(s).digest()
return hashlib.sha1(s).digest()
def randomid():
return os.urandom(20)