diff options
author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-08-10 17:01:21 +0900 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-08-10 17:01:21 +0900 |
commit | e19f97dae1745a4376d059b3d07e605144ce0719 (patch) | |
tree | 6f8bf0cd0173bce6e8241acd99986b4d966168b4 /sphinx/ext/graphviz.py | |
parent | 7aed098f5d231d6a5018169664f39397a3eba54f (diff) | |
download | sphinx-git-e19f97dae1745a4376d059b3d07e605144ce0719.tar.gz |
refactoring. remove old python related code (from sha import sha)
Diffstat (limited to 'sphinx/ext/graphviz.py')
-rw-r--r-- | sphinx/ext/graphviz.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index 27e9cd1c7..3c2bacee3 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -15,10 +15,7 @@ import codecs import posixpath from os import path from subprocess import Popen, PIPE -try: - from hashlib import sha1 as sha -except ImportError: - from sha import sha +from hashlib import sha1 from six import text_type from docutils import nodes @@ -147,7 +144,7 @@ def render_dot(self, code, options, format, prefix='graphviz'): str(self.builder.config.graphviz_dot_args) ).encode('utf-8') - fname = '%s-%s.%s' % (prefix, sha(hashkey).hexdigest(), format) + fname = '%s-%s.%s' % (prefix, sha1(hashkey).hexdigest(), format) if hasattr(self.builder, 'imgpath'): # HTML relfn = posixpath.join(self.builder.imgpath, fname) |