index : livejrnl.git

ascending towards madness

author holly sparkles <sparkles@holly.sh> 2023-09-24 14:29:22.0 +00:00:00
committer holly sparkles <sparkles@holly.sh> 2023-09-24 14:29:22.0 +00:00:00
commit
e073d9ad6670db97aff8a6954b344890469d303c [patch]
tree
735b529fa46880a867570fe4d735708d8e26aebe
parent
6296aef381895e5dae8fb3081ab8ecfc934567e8
download
main.tar.gz

fix: fix crashing when subprocess output contains stderr



Diff

 src/livejrnl.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/livejrnl.py b/src/livejrnl.py
index 0ae28c1..b19eb59 100644
--- a/src/livejrnl.py
+++ b/src/livejrnl.py
@@ -28,8 +28,8 @@ def parse_args() -> dict:

def get_journal() -> dict:
    """Load a jrnl journal and return it as JSON"""
    json_data: str = subprocess.getoutput("jrnl --format json")
    return json.loads(json_data)
    json_data = subprocess.run(["jrnl", "--format", "json"], capture_output=True, encoding='UTF-8')
    return json.loads(json_data.stdout)


def get_default_config() -> dict: