Lint fix
parent
3307f64a52
commit
a3874084b2
|
@ -77,7 +77,7 @@ class RequirementException(Exception):
|
||||||
|
|
||||||
|
|
||||||
class NTFSImplementation(Enum):
|
class NTFSImplementation(Enum):
|
||||||
Kernel = 1
|
KERNEL = 1
|
||||||
NTFS3G = 2
|
NTFS3G = 2
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ class NTFSLibrary:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.logger.info(f"Mounting {device} in {mountpoint} using implementation {self.implementation}")
|
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)
|
subprocess.run(["/usr/bin/mount", "-t", "ntfs3", device, mountpoint], check = True)
|
||||||
elif self.implementation == NTFSImplementation.NTFS3G:
|
elif self.implementation == NTFSImplementation.NTFS3G:
|
||||||
subprocess.run(["/usr/bin/ntfs-3g", device, mountpoint], check = True)
|
subprocess.run(["/usr/bin/ntfs-3g", device, mountpoint], check = True)
|
||||||
|
@ -195,13 +195,13 @@ class NTFSLibrary:
|
||||||
class OpengnsysGitLibrary:
|
class OpengnsysGitLibrary:
|
||||||
|
|
||||||
"""OpenGnsys Git Library"""
|
"""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.
|
Initializes the Git library for OpenGnsys.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
require_cache (bool): Indicates whether a cache partition is required. Defaults to True.
|
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:
|
Raises:
|
||||||
RequirementException: If the cache partition is required but cannot be mounted.
|
RequirementException: If the cache partition is required but cannot be mounted.
|
||||||
|
@ -1623,11 +1623,11 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
logger.debug("Starting")
|
logger.debug("Starting")
|
||||||
|
|
||||||
ntfs_impl = NTFSImplementation.Kernel
|
ntfs_impl = NTFSImplementation.KERNEL
|
||||||
|
|
||||||
if not args.ntfs_type is None:
|
if not args.ntfs_type is None:
|
||||||
if args.ntfs_type == "kernel":
|
if args.ntfs_type == "kernel":
|
||||||
ntfs_impl = NTFSImplementation.Kernel
|
ntfs_impl = NTFSImplementation.KERNEL
|
||||||
elif args.ntfs_type == "fuse":
|
elif args.ntfs_type == "fuse":
|
||||||
ntfs_impl = NTFSImplementation.NTFS3G
|
ntfs_impl = NTFSImplementation.NTFS3G
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue