From 7ba18b411c842a8f474eee613e7b71f5955136f2 Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Thu, 19 Sep 2024 19:47:59 +0200 Subject: [PATCH] Fix commandline parsing bug --- gitlib/gitlib.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gitlib/gitlib.py b/gitlib/gitlib.py index b03d3cd..9d5506b 100755 --- a/gitlib/gitlib.py +++ b/gitlib/gitlib.py @@ -1556,12 +1556,13 @@ if __name__ == '__main__': ntfs_impl = NTFSImplementation.Kernel - if args.ntfs_type == "kernel": - ntfs_impl = NTFSImplementation.Kernel - elif args.ntfs_type == "fuse": - ntfs_impl = NTFSImplementation.NTFS3G - else: - raise ValueError("Unknown NTFS implementation: {args.ntfs_type}") + if not args.ntfs_type is None: + if args.ntfs_type == "kernel": + ntfs_impl = NTFSImplementation.Kernel + elif args.ntfs_type == "fuse": + ntfs_impl = NTFSImplementation.NTFS3G + else: + raise ValueError(f"Unknown NTFS implementation: {args.ntfs_type}") og_git = OpengnsysGitLibrary(ntfs_implementation = ntfs_impl)