From 00c4bd3cad418ff0cb85eff7d3f5e59226962c96 Mon Sep 17 00:00:00 2001 From: Andreas Jung <yet@gmx.de> Date: Mon, 30 Mar 2009 20:16:54 +0000 Subject: [PATCH] using hashlib.sha1 if available in order to avoid DeprecationWarning under Python 2.6 --- src/ZEO/zrpc/smac.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ZEO/zrpc/smac.py b/src/ZEO/zrpc/smac.py index 586a4a4f..c5ca00f8 100644 --- a/src/ZEO/zrpc/smac.py +++ b/src/ZEO/zrpc/smac.py @@ -31,7 +31,10 @@ try: import hmac except ImportError: import _hmac as hmac -import sha +try: + from hashlib import sha1 as sha +except ImportError: + import sha import socket import struct import threading -- 2.30.9