mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-28 19:03:17 +01:00
Use util.read_file instead of inline file reading
This commit is contained in:
parent
f44ca5da87
commit
fefcd53fcf
@ -179,14 +179,12 @@ def parse_args(parser):
|
||||
colors_plain = theme.file(os.path.join(CACHE_DIR, "colors.json"))
|
||||
|
||||
if args.l:
|
||||
wallpaper_cache = open(os.path.join(CACHE_DIR, "wal"))
|
||||
cached_wallpaper = wallpaper_cache.read()
|
||||
colors_plain = colors.get(cached_wallpaper, True, args.backend,
|
||||
cached_wallpaper = util.read_file(os.path.join(CACHE_DIR, "wal"))
|
||||
colors_plain = colors.get(cached_wallpaper[0], True, args.backend,
|
||||
sat=args.saturate)
|
||||
elif args.d:
|
||||
wallpaper_cache = open(os.path.join(CACHE_DIR, "wal"))
|
||||
cached_wallpaper = wallpaper_cache.read()
|
||||
colors_plain = colors.get(cached_wallpaper, False, args.backend,
|
||||
cached_wallpaper = util.read_file(os.path.join(CACHE_DIR, "wal"))
|
||||
colors_plain = colors.get(cached_wallpaper[0], False, args.backend,
|
||||
sat=args.saturate)
|
||||
|
||||
if args.b:
|
||||
|
Loading…
Reference in New Issue
Block a user