| 48 | * 上記だけではNG[[br]][[Image(graphviz-error_sha.png, 33%)]] |
| 49 | * svn diff 0.11/graphviz/graphviz.py |
| 50 | {{{ |
| 51 | Index: 0.11/graphviz/graphviz.py |
| 52 | =================================================================== |
| 53 | --- 0.11/graphviz/graphviz.py (revision 9708) |
| 54 | +++ 0.11/graphviz/graphviz.py (working copy) |
| 55 | @@ -20,7 +20,7 @@ |
| 56 | import locale |
| 57 | import os |
| 58 | import re |
| 59 | -import sha |
| 60 | +import hashlib |
| 61 | import subprocess |
| 62 | import sys |
| 63 | |
| 64 | @@ -310,7 +310,7 @@ |
| 65 | encoded_cmd = (processor + unicode(self.processor_options)) \ |
| 66 | .encode(self.encoding) |
| 67 | encoded_content = content.encode(self.encoding) |
| 68 | - sha_key = sha.new(encoded_cmd + encoded_content).hexdigest() |
| 69 | + sha_key = hashlib.sha1(encoded_cmd + encoded_content).hexdigest() |
| 70 | img_name = '%s.%s.%s' % (sha_key, processor, out_format) |
| 71 | # cache: hash.<dot>.<png> |
| 72 | img_path = os.path.join(self.cache_dir, img_name) |
| 73 | }}} |