diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-09-23 20:57:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-23 20:57:26 -0400 |
commit | b72edb07d59d45d4006dc596218a52d54396378a (patch) | |
tree | 9875db04a91bbcef2815a32113268ffeed7e39cf /cmd2/cmd2.py | |
parent | 27a0adbe53c7cdeda240c325a6f59b7cca0e7bfd (diff) | |
parent | 88db3b44fb0b28b01b73376e1d2822d6c5995856 (diff) | |
download | cmd2-git-b72edb07d59d45d4006dc596218a52d54396378a.tar.gz |
Merge pull request #781 from python-cmd2/CompletionError
CompletionError class
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-x | cmd2/cmd2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 87f8684d..6bfcfdc8 100755 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -341,7 +341,7 @@ class Cmd(cmd.Cmd): def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *, persistent_history_file: str = '', persistent_history_length: int = 1000, - startup_script: Optional[str] = None, use_ipython: bool = False, + startup_script: str = '', use_ipython: bool = False, allow_cli_args: bool = True, transcript_files: Optional[List[str]] = None, allow_redirection: bool = True, multiline_commands: Optional[List[str]] = None, terminators: Optional[List[str]] = None, shortcuts: Optional[Dict[str, str]] = None) -> None: @@ -499,7 +499,7 @@ class Cmd(cmd.Cmd): self._startup_commands = [] # If a startup script is provided, then execute it in the startup commands - if startup_script is not None: + if startup_script: startup_script = os.path.abspath(os.path.expanduser(startup_script)) if os.path.exists(startup_script) and os.path.getsize(startup_script) > 0: self._startup_commands.append("run_script '{}'".format(startup_script)) |