aboutsummaryrefslogtreecommitdiff
path: root/git/test/fixtures
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-01 18:20:13 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-01 18:25:57 +0200
commit9a521681ff8614beb8e2c566cf3c475baca22169 (patch)
tree77365cb808a255eb53889725bfce775b5090330e /git/test/fixtures
parentbdf1e68f6bec679edc3feb455596e18c387879c4 (diff)
downloadGitPython-9a521681ff8614beb8e2c566cf3c475baca22169.tar.gz
GitPython-9a521681ff8614beb8e2c566cf3c475baca22169.zip
io, #519: ALL open() --> with open()
+ Some cases had restructuring of code.
Diffstat (limited to 'git/test/fixtures')
-rw-r--r--git/test/fixtures/cat_file.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/git/test/fixtures/cat_file.py b/git/test/fixtures/cat_file.py
index 2f1b915a..5480e628 100644
--- a/git/test/fixtures/cat_file.py
+++ b/git/test/fixtures/cat_file.py
@@ -1,5 +1,6 @@
import sys
-for line in open(sys.argv[1]).readlines():
- sys.stdout.write(line)
- sys.stderr.write(line)
+with open(sys.argv[1]) as fd:
+ for line in fd.readlines():
+ sys.stdout.write(line)
+ sys.stderr.write(line)