Commit a108266f authored by Jérome Perrin's avatar Jérome Perrin

tests: fix a resource warning

parent f7d36f80
......@@ -55,7 +55,8 @@ Let's write a file template::
Compute its MD5 sum::
>>> from hashlib import md5
>>> md5sum = md5(open('template.in', 'rb').read()).hexdigest()
>>> with open('template.in', 'rb') as f:
... md5sum = md5(f.read()).hexdigest()
Write the ``buildout.cfg`` using slapos.recipe.template::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment