From 9d9b24e415df8bd6662595169f330038ee45d569 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 27 Jun 2017 11:41:04 +1000 Subject: General: Add initial test. --- pywal/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pywal') 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): -- cgit v1.2.3