Commit 5b1aca1d5a

5b1aca1d5abd8fcacf5232c336a8288567f208de

parent: a41f6592de

Unsigned

Wraient <wraient.911@gmail.com> · 2024-09-25 13:02 UTC

print error function added

Layout: unified · split

curd.py +8 −1
@@ -15,6 +15,7 @@ import subprocess
1515import time
1616import curses
1717import argparse
18import traceback
1819import requests
1920import csv
2021import socket
@@ -494,7 +495,7 @@ def start_video(link, salt:str, args:list=[]):
494495
495496 subprocess.Popen(command, shell=True)
496497
497def send_command(ipc_socket_path, command):
498def mpv_send_command(ipc_socket_path, command):
498499 """
499500 Sends a command to the MPV IPC socket and returns the response.
500501 """
@@ -634,6 +635,12 @@ def find_anime(anime_list, anilist_id=-1, allanime_id=-1):
634635
635636# ----------------------------------------------- Curd Functions ----------------------------------------
636637
638def print_error(message):
639 """Print error message with full traceback."""
640 print(f"ERROR: {message}")
641 print("Traceback:")
642 traceback.print_exc()
643
637644def get_contents_of(tmp_file_name):
638645 with open(f"/tmp/curd/curd_{tmp_file_name}", "r") as temp_file:
639646 return temp_file.read()