freebsd-ports/devel/py-gdata/files/patch-src_gdata_tlslite_utils-jython_compat.py
Ruslan Makhmatkhanov 96cca9ec1d - update to 2.0.18
- apply all the patches unconditionally (we have no pythons less than 2.6)
- avoid PYTHON_SITELIBDIR usage
- tab -> space change in pkg-descr:WWW

PR:		179609
Submitted by:	rm (myself)
Approved by:	olivierd (maintainer)
2013-06-16 16:26:51 +00:00

29 lines
753 B
Python

--- src/gdata/tlslite/utils/jython_compat.py.orig 2008-12-02 03:35:28.000000000 +0100
+++ src/gdata/tlslite/utils/jython_compat.py 2009-11-03 21:55:05.916366480 +0100
@@ -1,7 +1,7 @@
"""Miscellaneous functions to mask Python/Jython differences."""
import os
-import sha
+import hashlib
if os.name != "java":
BaseException = Exception
@@ -43,7 +43,7 @@
#Factory function for getting a SHA1 object
def getSHA1(s):
- return sha.sha(s)
+ return hashlib.sha1(s)
import sys
import traceback
@@ -175,7 +175,7 @@
#release, and needs to be patched
def getSHA1(s):
#return JCE_SHA1(s)
- return sha.sha(s)
+ return hashlib.sha1(s)
#Adjust the string to an array of bytes