From: W. Trevor King Date: Sun, 9 Jan 2011 02:47:27 +0000 (-0500) Subject: Use hashlib.md5 rather than the deprecated md5.md5 in depgraph2dot.py. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6ace694c676cfc82860f826efb85cb784d407378;p=depgraph.git Use hashlib.md5 rather than the deprecated md5.md5 in depgraph2dot.py. --- diff --git a/depgraph2dot.py b/depgraph2dot.py index 6d11157..23ad7f3 100755 --- a/depgraph2dot.py +++ b/depgraph2dot.py @@ -22,7 +22,8 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import sys, getopt, colorsys, imp, md5, re, pprint +import sys, getopt, colorsys, imp, re, pprint +from hashlib import md5 from os import popen, getuid # for finding C extension dependencies with system calls from pwd import getpwuid @@ -210,7 +211,7 @@ class dotformat (object) : else: return mod_name[:i] def _color_from_name(self,name): - n = md5.md5(name).digest() + n = md5(name).digest() hf = float(ord(n[0])+ord(n[1])*0xff)/0xffff sf = float(ord(n[2]))/0xff vf = float(ord(n[3]))/0xff