Skip to content

Commit

Permalink
use environ.get
Browse files Browse the repository at this point in the history
this will prevent malformed sessions that don't initialize the DESKTOP_SESSION
env var from throwing an exception.
  • Loading branch information
eylles committed Jun 8, 2024
1 parent b9ce25b commit 8aad28a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pywal/sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def send(colors, cache_dir=CACHE_DIR, to_send=True, vte_fix=False):
if to_send:
for dev in devices:
if dev == "/dev/pts/0":
if os.environ["DESKTOP_SESSION"] == "plasma":
if os.environ.get("DESKTOP_SESSION") == "plasma":
continue
util.save_file(sequences, dev)

Expand Down

0 comments on commit 8aad28a

Please sign in to comment.