ticket-769
Vadim vtroshchinskiy 2024-10-08 16:15:00 +02:00
parent 3307f64a52
commit a3874084b2
1 changed files with 7 additions and 7 deletions

View File

@ -77,7 +77,7 @@ class RequirementException(Exception):
class NTFSImplementation(Enum):
Kernel = 1
KERNEL = 1
NTFS3G = 2
@ -139,7 +139,7 @@ class NTFSLibrary:
"""
self.logger.info(f"Mounting {device} in {mountpoint} using implementation {self.implementation}")
if self.implementation == NTFSImplementation.Kernel:
if self.implementation == NTFSImplementation.KERNEL:
subprocess.run(["/usr/bin/mount", "-t", "ntfs3", device, mountpoint], check = True)
elif self.implementation == NTFSImplementation.NTFS3G:
subprocess.run(["/usr/bin/ntfs-3g", device, mountpoint], check = True)
@ -195,13 +195,13 @@ class NTFSLibrary:
class OpengnsysGitLibrary:
"""OpenGnsys Git Library"""
def __init__(self, require_cache = True, ntfs_implementation = NTFSImplementation.Kernel):
def __init__(self, require_cache = True, ntfs_implementation = NTFSImplementation.KERNEL):
"""
Initializes the Git library for OpenGnsys.
Args:
require_cache (bool): Indicates whether a cache partition is required. Defaults to True.
ntfs_implementation (NTFSImplementation): Specifies the NTFS implementation to use. Defaults to NTFSImplementation.Kernel.
ntfs_implementation (NTFSImplementation): Specifies the NTFS implementation to use. Defaults to NTFSImplementation.KERNEL.
Raises:
RequirementException: If the cache partition is required but cannot be mounted.
@ -1500,7 +1500,7 @@ class OpengnsysGitLibrary:
self._delete_contents(destination_dir)
self.logger.info("Cloning repository from %s", repo_url)
repo = git.Repo.clone_from(repo_url, destination_dir, multi_options = [f"--separate-git-dir={real_git_dir}"])
if repo_is_efi:
@ -1623,11 +1623,11 @@ if __name__ == '__main__':
logger.debug("Starting")
ntfs_impl = NTFSImplementation.Kernel
ntfs_impl = NTFSImplementation.KERNEL
if not args.ntfs_type is None:
if args.ntfs_type == "kernel":
ntfs_impl = NTFSImplementation.Kernel
ntfs_impl = NTFSImplementation.KERNEL
elif args.ntfs_type == "fuse":
ntfs_impl = NTFSImplementation.NTFS3G
else: