1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-17 18:50:33 -04:00
ports/www/trac-math/files/patch-tracmath_tracmath.py
Dmitry Marakasov bdb06fad8a www/trac-*: minor cleanup
- Don't use trac/plugin.mk which is now empty and unneeded
- Add some NO_ARCH'es
- Add/fix some LICENSEs and LICENSE_FILES
- Pet portlint
- Regenerate some patches

Approved by:	portmgr blanket
2016-05-29 01:29:08 +00:00

21 lines
583 B
Python

--- tracmath/tracmath.py.orig 2008-04-04 08:58:46 UTC
+++ tracmath/tracmath.py
@@ -4,8 +4,8 @@ This has currently been tested only on t
"""
import codecs
+import hashlib
import re
-import sha
from cStringIO import StringIO
import os
import sys
@@ -142,7 +142,7 @@ class TracMathPlugin(Component):
if m:
label = m.group(1)
- key = sha.new(content.encode('utf-8')).hexdigest()
+ key = hashlib.sha1(content.encode('utf-8')).hexdigest()
imgname = key + '.png'
imgpath = os.path.join(self.cacheDirectory, imgname)