Commit 3b8a35d6 by Michael DeHaan

Merge pull request #7406 from specnazzz/fix-python24

Fix known_hosts.py to work on older versions of python
parents 79731ce4 60451c20
......@@ -27,7 +27,12 @@
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import hmac
from hashlib import sha1
try:
from hashlib import sha1
except ImportError:
import sha as sha1
HASHED_KEY_MAGIC = "|1|"
def add_git_host_key(module, url, accept_hostkey=True, create_dir=True):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment