Skip to content
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.

Commit

Permalink
Made something look more Pythonic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Myles Braithwaite committed Feb 4, 2010
1 parent 345a31d commit fdcbe8c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions blog/models.py
Expand Up @@ -109,10 +109,9 @@ def get_previous_post(self):
def digital_fingerprint(self):
try:
from hashlib import md5
return md5(self.title).hexdigest()
except ImportError:
import md5
return md5.new(self.title).hexdigest()
from md5 import new as md5
return md5(self.title).hexdigest()

def _get_comment_count(self):
return u"%s" % self.comments.count()
Expand Down

0 comments on commit fdcbe8c

Please sign in to comment.