Several pylint fixes.

This commit is contained in:
Marco Pesenti Gritti
2008-08-11 00:50:29 +02:00
parent 4c35d77854
commit 80190bf944
7 changed files with 20 additions and 14 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ def printable_hash(in_hash):
printable = printable + binascii.b2a_hex(char)
return printable
def _sha_data(data):
def sha_data(data):
"""sha1 hash some bytes."""
sha_hash = sha.new()
sha_hash.update(data)
@@ -52,7 +52,7 @@ def unique_id(data = ''):
perfectly unique values.
"""
data_string = "%s%s%s" % (time.time(), random.randint(10000, 100000), data)
return printable_hash(_sha_data(data_string))
return printable_hash(sha_data(data_string))
ACTIVITY_ID_LEN = 40