From 25a817bfa97fcb6d202397252e55bba088ead32d Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 17 Feb 2022 18:25:55 +0530 Subject: etc: Close VERSION file after opening. Use a context manager so that the VERSION file is automatically closed on exiting the block. * etc/default_settings.py: Close VERSION file after opening. --- etc/default_settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc/default_settings.py') diff --git a/etc/default_settings.py b/etc/default_settings.py index 8636f4db..a0d01de0 100644 --- a/etc/default_settings.py +++ b/etc/default_settings.py @@ -24,7 +24,8 @@ import os import sys -GN_VERSION = open("../etc/VERSION", "r").read() +with open("../etc/VERSION", "r") as version_file: + GN_VERSION = version_file.read() # Redis REDIS_URL = "redis://:@localhost:6379/0" -- cgit v1.2.3