Skip to content

Commit 7e67ea6

Browse files
Merge pull request #35 from sp1rs/patch-1
Use context manager for file opening.
2 parents b570b0e + 80a9d1d commit 7e67ea6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wiremock/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
22

33
__wiremock_version_path__ = os.path.realpath(__file__ + '/../VERSION')
4-
__version__ = open(__wiremock_version_path__, 'r').readline().strip()
4+
with open(__wiremock_version_path__, 'r') as f:
5+
__version__ = f.readline().strip()

0 commit comments

Comments
 (0)