Changeset - 87aebcc15dc2
[Not reviewed]
default
0 2 0
Mads Kiilerich - 10 years ago 2015-07-20 15:11:41
madski@unity3d.com
lib: cleanup around use of the random and hash libraries
2 files changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/auth.py
Show inline comments
 
@@ -33,7 +33,6 @@ import hashlib
 
import itertools
 
import collections
 

	
 
from tempfile import _RandomNameSequence
 
from decorator import decorator
 

	
 
from pylons import url, request
kallithea/lib/helpers.py
Show inline comments
 
@@ -17,7 +17,6 @@ Helper functions
 
Consists of functions to typically be used within templates, but also
 
available to Controllers. This module is available to both as 'h'.
 
"""
 
import random
 
import hashlib
 
import StringIO
 
import math
 
@@ -30,7 +29,7 @@ from pygments.formatters.html import Htm
 
from pygments import highlight as code_highlight
 
from pylons import url
 
from pylons.i18n.translation import _, ungettext
 
from hashlib import md5
 
from hashlib import md5 # used as h.md5
 

	
 
from webhelpers.html import literal, HTML, escape
 
from webhelpers.html.tools import *
 
@@ -130,7 +129,7 @@ def FID(raw_id, path):
 
    :param path:
 
    """
 

	
 
    return 'C-%s-%s' % (short_id(raw_id), md5(safe_str(path)).hexdigest()[:12])
 
    return 'C-%s-%s' % (short_id(raw_id), hashlib.md5(safe_str(path)).hexdigest()[:12])
 

	
 

	
 
class _GetError(object):
0 comments (0 inline, 0 general)