diff --git a/aots-e/aotse.py b/aots-e/aotse.py index e5f3756..bc125d1 100644 --- a/aots-e/aotse.py +++ b/aots-e/aotse.py @@ -94,9 +94,9 @@ def run_benchmark(process_name, command_to_run): # Log any output and error from the Steam process if stdout: - logging.info(f"Steam Output: %s", stdout) + logging.info("Steam Output: %s", stdout) if stderr: - logging.error(f"Steam Error: %s", stderr) + logging.error("Steam Error: %s", stderr) # Now, return the process object return proc diff --git a/aots-e/aotse_utils.py b/aots-e/aotse_utils.py index eaa88f1..7eef00d 100644 --- a/aots-e/aotse_utils.py +++ b/aots-e/aotse_utils.py @@ -43,7 +43,7 @@ def delete_old_scores(file): for file in files: try: os.remove(file) - logging.info(f"Deleted old score file: {file}") + logging.info("Deleted old score file: %s", file) except Exception as e: print(f"Error deleting file {file}: {e}") @@ -73,7 +73,7 @@ def is_process_running(process_name): def wait_for_benchmark_process(test_name, process_name, timeout=60): """Wait for the benchmark game process to start and then finish.""" - logging.info(f"Waiting for benchmark process '{process_name}' to start...") + logging.info("Waiting for benchmark process '%s' to start...", process_name) start_time = time.time() @@ -81,15 +81,15 @@ def wait_for_benchmark_process(test_name, process_name, timeout=60): # Check if the benchmark process is running process = is_process_running(process_name) if process: - logging.info(f"{test_name} has started. Waiting for it to finish...") + logging.info("%s has started. Waiting for it to finish...", test_name) process.wait() # This will block until the process finishes logging.info("Benchmark has finished.") break # If we exceed the timeout, break out of the loop and log an error if time.time() - start_time > timeout: - logging.error(f"Timeout reached while waiting for process '%s'.", process_name) - raise TimeoutError(f"Process '%s' did not start within the expected time. Is the game configured for DX12?", process_name) + logging.error("Timeout reached while waiting for process '%s'.", process_name) + raise TimeoutError("Process '%s' did not start within the expected time. Is the game configured for DX12?", process_name) # Wait for 1 second before checking again - time.sleep(1) \ No newline at end of file + time.sleep(1) diff --git a/forzamotorsport/forzams_utils.py b/forzamotorsport/forzams_utils.py index fd76f16..d9cd417 100644 --- a/forzamotorsport/forzams_utils.py +++ b/forzamotorsport/forzams_utils.py @@ -23,4 +23,4 @@ def get_args() -> any: "--kerasHost", dest="keras_host", help="Host for Keras OCR service", required=True) parser.add_argument( "--kerasPort", dest="keras_port", help="Port for Keras OCR service", required=True) - return parser.parse_args() \ No newline at end of file + return parser.parse_args() diff --git a/horizonzdr/hzdr_utils.py b/horizonzdr/hzdr_utils.py index 21ed211..f8f5834 100644 --- a/horizonzdr/hzdr_utils.py +++ b/horizonzdr/hzdr_utils.py @@ -90,4 +90,4 @@ def get_args() -> any: "--kerasHost", dest="keras_host", help="Host for Keras OCR service", required=True) parser.add_argument( "--kerasPort", dest="keras_port", help="Port for Keras OCR service", required=True) - return parser.parse_args() \ No newline at end of file + return parser.parse_args()