diff options
| author | Dylan Araps <[email protected]> | 2017-06-23 14:31:52 +1000 |
|---|---|---|
| committer | Dylan Araps <[email protected]> | 2017-06-23 14:31:52 +1000 |
| commit | f82677c9609929a12d9bb25d9ab200718accb1c0 (patch) | |
| tree | e17cb02ea6ee78fb47b67790cac1e8fa8020c501 /wal | |
| parent | General: Move duplicate code to a function. (diff) | |
| download | pywal-f82677c9609929a12d9bb25d9ab200718accb1c0.tar.xz pywal-f82677c9609929a12d9bb25d9ab200718accb1c0.zip | |
General: Simplify file read.
Diffstat (limited to 'wal')
| -rwxr-xr-x | wal | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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): |