From a3874084b235eaa9bb8d10e6717138e2ed424cb3 Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Tue, 8 Oct 2024 16:15:00 +0200 Subject: [PATCH] Lint fix --- gitlib/gitlib.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gitlib/gitlib.py b/gitlib/gitlib.py index d9293b3..9bfbd13 100755 --- a/gitlib/gitlib.py +++ b/gitlib/gitlib.py @@ -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: