mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Avoid 3.10 type hinting
This commit is contained in:
@@ -9,6 +9,7 @@ import logging
|
||||
import binascii
|
||||
import threading
|
||||
|
||||
from typing import Union
|
||||
from pathlib import Path
|
||||
|
||||
CHUNK_LENGTH = 4 + 32
|
||||
@@ -43,7 +44,7 @@ class ChunklistVerification:
|
||||
... print(chunk_obj.error_msg)
|
||||
"""
|
||||
|
||||
def __init__(self, file_path: Path, chunklist_path: Path | bytes) -> None:
|
||||
def __init__(self, file_path: Path, chunklist_path: Union[Path, bytes]) -> None:
|
||||
if isinstance(chunklist_path, bytes):
|
||||
self.chunklist_path: bytes = chunklist_path
|
||||
else:
|
||||
@@ -59,7 +60,7 @@ class ChunklistVerification:
|
||||
self.status: ChunklistStatus = ChunklistStatus.IN_PROGRESS
|
||||
|
||||
|
||||
def _generate_chunks(self, chunklist: Path | bytes) -> dict:
|
||||
def _generate_chunks(self, chunklist: Union[Path, bytes]) -> dict:
|
||||
"""
|
||||
Generate a dictionary of the chunklist header and chunks
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import plistlib
|
||||
import os
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
from typing import Union
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
|
||||
@@ -213,7 +215,7 @@ class SysPatchHelpers:
|
||||
logging.info(f" - Failed to install RSRRepair: {result.stdout.decode()}")
|
||||
|
||||
|
||||
def patch_gpu_compiler_libraries(self, mount_point: str | Path):
|
||||
def patch_gpu_compiler_libraries(self, mount_point: Union[str, Path]):
|
||||
"""
|
||||
Fix GPUCompiler.framework's libraries to resolve linking issues
|
||||
|
||||
|
||||
Reference in New Issue
Block a user