Skip to content

Commit

Permalink
rdflib.compare fix, md5 sum was never reinitialised, re: #297
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgull committed Jul 29, 2013
1 parent 504ccf4 commit 8fad4ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rdflib/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@
from rdflib.term import BNode
try:
import hashlib
md = hashlib.md5()
md = hashlib.md5
except ImportError:
# for Python << 2.5
import md5
md = md5.new()
md = md5.new


class IsomorphicGraph(ConjunctiveGraph):
Expand Down Expand Up @@ -237,7 +237,7 @@ def graph_diff(g1, g2):


def _md5_hash(t):
h = md
h = md()
for i in t:
if isinstance(i, tuple):
h.update(_md5_hash(i).encode('ascii'))
Expand Down

0 comments on commit 8fad4ed

Please sign in to comment.