Mercurial > p > roundup > code
diff roundup/rest.py @ 5646:d791c5ba5852
Python 3 compatibility encode repr when caclulating etag.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 10 Mar 2019 19:30:03 -0400 |
| parents | b4d7588c74a4 |
| children | e8ca7072c629 ba67e397f063 |
line wrap: on
line diff
--- a/roundup/rest.py Sun Mar 10 18:09:35 2019 -0400 +++ b/roundup/rest.py Sun Mar 10 19:30:03 2019 -0400 @@ -27,6 +27,7 @@ from roundup import hyperdb from roundup import date from roundup import actions +from roundup.anypy.strings import bs2b from roundup.exceptions import * from roundup.cgi.exceptions import * @@ -125,7 +126,7 @@ ''' items = node.items(protected=True) # include every item - etag = md5(repr(items)).hexdigest() + etag = md5(bs2b(repr(items))).hexdigest() logger.debug("object=%s%s; tag=%s; repr=%s", classname, id, etag, repr(node.items(protected=True))) return etag
