From 41db80fa2930068b3d3b25e51adc8723fc91b9e3 Mon Sep 17 00:00:00 2001 From: Eduardo Suarez-Santana Date: Thu, 26 Dec 2024 14:49:30 +0000 Subject: [PATCH] Fix TypeError on xsel module If `log_file` is `None`, then will get a `TypeError`: ``` TypeError: expected str, bytes or os.PathLike object, not NoneType ``` --- py3status/modules/xsel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py3status/modules/xsel.py b/py3status/modules/xsel.py index 3f4de928ca..47edbcb24f 100644 --- a/py3status/modules/xsel.py +++ b/py3status/modules/xsel.py @@ -50,7 +50,8 @@ class Py3status: def post_config_hook(self): self.selection_cache = None - self.log_file = Path(self.log_file).expanduser() + if self.log_file: + self.log_file = Path(self.log_file).expanduser() def xsel(self): selection = self.py3.command_output(self.command).strip()