1
0
Fork 0

Fixed error in cli name

This commit is contained in:
JoshuaMKW 2020-10-20 03:52:53 -05:00
parent 5f0ed4fb86
commit a6b20ae53e
2 changed files with 6 additions and 3 deletions

View file

@ -36,7 +36,7 @@ except ImportError:
__version__ = 'v6.2.0' __version__ = 'v6.2.0'
def resource_path(relative_path: str): def resource_path(relative_path: str = ""):
""" Get absolute path to resource, works for dev and for PyInstaller """ """ Get absolute path to resource, works for dev and for PyInstaller """
base_path = os.path.dirname(os.path.realpath(sys.argv[0])) base_path = os.path.dirname(os.path.realpath(sys.argv[0]))
return os.path.join(base_path, relative_path) return os.path.join(base_path, relative_path)
@ -62,7 +62,7 @@ def clean_tmp_resources():
class GeckoLoaderCli(CommandLineParser): class GeckoLoaderCli(CommandLineParser):
def __init__(self, name, version=None, description=''): def __init__(self, name, version=None, description=''):
super().__init__(prog=(name+' '+version), description=description, allow_abbrev=False) super().__init__(prog=(f"{name} {version}"), description=description, allow_abbrev=False)
self.__version__ = version self.__version__ = version
self.__doc__ = description self.__doc__ = description
@ -124,6 +124,9 @@ class GeckoLoaderCli(CommandLineParser):
self.add_argument('--encrypt', self.add_argument('--encrypt',
help='Encrypts the codelist on compile time, helping to slow the snoopers', help='Encrypts the codelist on compile time, helping to slow the snoopers',
action='store_true') action='store_true')
self.add_argument('--disablecolor',
help='Disables the colorization of text output',
action='store_true')
self.add_argument('-q', '--quiet', self.add_argument('-q', '--quiet',
help='Print nothing to the console', help='Print nothing to the console',
action='store_true') action='store_true')
@ -193,7 +196,7 @@ class GeckoLoaderCli(CommandLineParser):
sys.exit(0) sys.exit(0)
if __name__ == "__main__": if __name__ == "__main__":
parser = GeckoLoaderCli('GeckoLoader ' + __version__, __version__, description='Dol editing tool for allocating extended codespace') parser = GeckoLoaderCli('GeckoLoader', __version__, description='Dol editing tool for allocating extended codespace')
if len(sys.argv) == 1: if len(sys.argv) == 1:
parser.print_splash() parser.print_splash()

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB