diff --git a/ptop.py b/ptop.py index 3cdc0dc..a051635 100644 --- a/ptop.py +++ b/ptop.py @@ -38,8 +38,8 @@ def parse(input_line: str) -> dict: return parsed -def progress(lines, total_jops): - return (len(lines) / tj) * 100 if tj else 0 +def progress(lines, total_jobs): + return (len(lines) / total_jobs) * 100 if total_jobs else 0 def ascii_progress_bar(percentage, bar_length=50): @@ -125,4 +125,4 @@ def ascii_progress_bar(percentage, bar_length=50): except IOError as e: print(f"Error reading the file '{args.logfile}': {e}") except ZeroDivisionError: - print("Error: Total jobs parameter must be a positive integer.") + print("Error: Total jobs parameter must be a positive integer.") \ No newline at end of file