Meta: Avoid an IndexError with .get() instead of indexing in the weeknotes script
Replace indexing into the os.environ dictionary with a .get() call (and a default) to avoid an IndexError
This commit is contained in:
parent
2d6912aed2
commit
b7fb364862
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ def parse_args(argv, *a, **kw):
|
|||
)
|
||||
edit_command.add_argument(
|
||||
'--editor', '-e',
|
||||
default=os.environ['EDITOR'] or 'nvim',
|
||||
default=os.environ.get('EDITOR', 'nvim'),
|
||||
)
|
||||
edit_command.add_argument('--week', '-w')
|
||||
edit_command.set_defaults(handler=handle_edit_command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue