From f82677c9609929a12d9bb25d9ab200718accb1c0 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 23 Jun 2017 14:31:52 +1000 Subject: General: Simplify file read. --- wal | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/wal b/wal index b27eba0..8e34683 100755 --- a/wal +++ b/wal @@ -524,13 +524,8 @@ def reload_colors(vte): def read_file(input_file): - """Read colors from a file""" - with open(input_file) as file: - contents = file.readlines() - - # Strip newlines from each list element. - contents = [x.strip() for x in contents] - return contents + """Read colors from a file.""" + return open(input_file).read().splitlines() def save_file(colors, export_file): -- cgit v1.2.3