summaryrefslogtreecommitdiff
path: root/pywal
diff options
context:
space:
mode:
Diffstat (limited to 'pywal')
-rwxr-xr-xpywal/util.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pywal/util.py b/pywal/util.py
index bc385d9..67baa6a 100755
--- a/pywal/util.py
+++ b/pywal/util.py
@@ -8,7 +8,9 @@ import subprocess
def read_file(input_file):
"""Read colors from a file."""
- return open(input_file).read().splitlines()
+ with open(input_file) as file:
+ colors = file.read().splitlines()
+ return colors
def save_file(colors, export_file):