summaryrefslogtreecommitdiff
path: root/pywal
diff options
context:
space:
mode:
authorDylan Araps <dylanaraps@users.noreply.github.com>2017-06-27 17:57:14 +1000
committerGitHub <noreply@github.com>2017-06-27 17:57:14 +1000
commitea160a42dec139148845aeb3043db5ba23bd9a6c (patch)
tree24ebf656944839f6328b1bef09a46a56800a1ca6 /pywal
parent277c27c98a819c8e8de9dffde07192791a0d16d4 (diff)
parent7c3676c809a06aafb4f6f3b8cdc289c946be7695 (diff)
Merge pull request #11 from dylanaraps/tests
Tests: Start writing tests.
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):