Skip to content

Commit

Permalink
Fix TypeError on xsel module
Browse files Browse the repository at this point in the history
If `log_file` is `None`, then will get a `TypeError`:

``` 
TypeError: expected str, bytes or os.PathLike object, not NoneType
```
  • Loading branch information
esuarezsantana authored Dec 26, 2024
1 parent 5d73d00 commit 41db80f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion py3status/modules/xsel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 41db80f

Please sign in to comment.