mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 13:39:24 -05:00
Windows path fixes (#129)
* Change uses of os.path to use Pathlib * Add return types and type hints * Add more docstrings * Add missing import to api_server
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import json
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from src.engines.core.base_engine import *
|
||||
from src.utilities.misc_helper import system_safe_path
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
@@ -89,7 +89,7 @@ class Blender(BaseRenderEngine):
|
||||
scene_info = {}
|
||||
try:
|
||||
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'get_file_info.py')
|
||||
results = self.run_python_script(project_path=project_path, script_path=system_safe_path(script_path),
|
||||
results = self.run_python_script(project_path=project_path, script_path=Path(script_path),
|
||||
timeout=timeout)
|
||||
result_text = results.stdout.decode()
|
||||
for line in result_text.splitlines():
|
||||
@@ -110,7 +110,7 @@ class Blender(BaseRenderEngine):
|
||||
try:
|
||||
logger.info(f"Starting to pack Blender file: {project_path}")
|
||||
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'pack_project.py')
|
||||
results = self.run_python_script(project_path=project_path, script_path=system_safe_path(script_path),
|
||||
results = self.run_python_script(project_path=project_path, script_path=Path(script_path),
|
||||
timeout=timeout)
|
||||
|
||||
result_text = results.stdout.decode()
|
||||
|
||||
Reference in New Issue
Block a user