mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-01 23:45:46 +02:00
General: Simplify file read.
This commit is contained in:
parent
5531402369
commit
f82677c960
9
wal
9
wal
@ -524,13 +524,8 @@ def reload_colors(vte):
|
|||||||
|
|
||||||
|
|
||||||
def read_file(input_file):
|
def read_file(input_file):
|
||||||
"""Read colors from a file"""
|
"""Read colors from a file."""
|
||||||
with open(input_file) as file:
|
return open(input_file).read().splitlines()
|
||||||
contents = file.readlines()
|
|
||||||
|
|
||||||
# Strip newlines from each list element.
|
|
||||||
contents = [x.strip() for x in contents]
|
|
||||||
return contents
|
|
||||||
|
|
||||||
|
|
||||||
def save_file(colors, export_file):
|
def save_file(colors, export_file):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user