lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 1.4-9-g878e036

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum branch master updated. 1.4-9-g878e036



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".

The branch, master has been updated
       via  878e0360d5820fc7616eb68a87f8b88f15684c44 (commit)
      from  be24790818d1c8c32a055613c22fd98556455800 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/python-stdnum/commit/?id=878e0360d5820fc7616eb68a87f8b88f15684c44

commit 878e0360d5820fc7616eb68a87f8b88f15684c44
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sat Sep 10 16:15:26 2016 +0200

    Avoid leaving open file descriptor in test

diff --git a/stdnum/numdb.py b/stdnum/numdb.py
index c8cbc3c..ea3c3b9 100644
--- a/stdnum/numdb.py
+++ b/stdnum/numdb.py
@@ -25,7 +25,8 @@ numbers, etc).
 
 To read a database from a file:
 
->>> dbfile = read(open('tests/numdb-test.dat', 'r'))
+>>> with open('tests/numdb-test.dat', 'r') as f:
+...     dbfile = read(f)
 
 To split a number:
 

-----------------------------------------------------------------------

Summary of changes:
 stdnum/numdb.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
python-stdnum
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/python-stdnum-commits/