##// END OF EJS Templates
lib: cleanup around use of the random and hash libraries
Mads Kiilerich -
r5273:87aebcc1 default
parent child Browse files
Show More
@@ -33,7 +33,6 b' import hashlib'
33 33 import itertools
34 34 import collections
35 35
36 from tempfile import _RandomNameSequence
37 36 from decorator import decorator
38 37
39 38 from pylons import url, request
@@ -17,7 +17,6 b' Helper functions'
17 17 Consists of functions to typically be used within templates, but also
18 18 available to Controllers. This module is available to both as 'h'.
19 19 """
20 import random
21 20 import hashlib
22 21 import StringIO
23 22 import math
@@ -30,7 +29,7 b' from pygments.formatters.html import Htm'
30 29 from pygments import highlight as code_highlight
31 30 from pylons import url
32 31 from pylons.i18n.translation import _, ungettext
33 from hashlib import md5
32 from hashlib import md5 # used as h.md5
34 33
35 34 from webhelpers.html import literal, HTML, escape
36 35 from webhelpers.html.tools import *
@@ -130,7 +129,7 b' def FID(raw_id, path):'
130 129 :param path:
131 130 """
132 131
133 return 'C-%s-%s' % (short_id(raw_id), md5(safe_str(path)).hexdigest()[:12])
132 return 'C-%s-%s' % (short_id(raw_id), hashlib.md5(safe_str(path)).hexdigest()[:12])
134 133
135 134
136 135 class _GetError(object):
General Comments 0
You need to be logged in to leave comments. Login now