Skip to content

Commit 80a9d1d

Browse files
authored
Update __init__.py
Use context manager for file opening.
1 parent b570b0e commit 80a9d1d

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)