Commits

ben  committed 7dcf517

精简md5生成函数

  • Participants
  • Parent commits 6369fba

Comments (0)

Files changed (1)

 from google.appengine.api import memcache
 
 def get_md5(bf):
-    md5 = hashlib.md5()
-    md5.update(bf)
-    return md5.hexdigest()
+    return hashlib.md5(bf).hexdigest()
 
 class Album(db.Model):
     '''