summaryrefslogtreecommitdiff
path: root/bvg-grabber.py
diff options
context:
space:
mode:
authorChristian Struck <christian@struck.se>2017-11-03 10:43:34 +0100
committerGitHub <noreply@github.com>2017-11-03 10:43:34 +0100
commit7664fb26df0c4ba0f03504b55e15022769bab861 (patch)
tree1bb38dbd2973cc74b95172f6787e9b398587396b /bvg-grabber.py
parentb74f3795d4c65f1f98a58d6644c80d71b4f86e5d (diff)
parenta02bbe591bdf72423f4246815402ab23c61247b5 (diff)
downloadbvg-grabber-7664fb26df0c4ba0f03504b55e15022769bab861.tar.gz
bvg-grabber-7664fb26df0c4ba0f03504b55e15022769bab861.tar.bz2
bvg-grabber-7664fb26df0c4ba0f03504b55e15022769bab861.zip
Merge pull request #12 from c7h/develop
updated to BS4.4.1
Diffstat (limited to 'bvg-grabber.py')
-rwxr-xr-xbvg-grabber.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bvg-grabber.py b/bvg-grabber.py
index 3964f83..3a2d623 100755
--- a/bvg-grabber.py
+++ b/bvg-grabber.py
@@ -59,7 +59,5 @@ if __name__ == '__main__':
if args.file in ('stdout', '-'):
print(res.to_json)
else:
- file = open(args.file, 'w')
- print(res.to_json, file=file)
- file.close()
-
+ with open(args.file, 'w') as f:
+ print(res.to_json, file=f) \ No newline at end of file