mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-17 00:24:50 -04:00
Fixed bug where os.path.isfile(None) is called
This commit is contained in:
parent
9af6bf373a
commit
393dd3ee69
1 changed files with 6 additions and 5 deletions
|
@ -53,10 +53,11 @@ def cli(ctx, **kwargs):
|
||||||
logger.debug(f"handling {kwargs['urls']}")
|
logger.debug(f"handling {kwargs['urls']}")
|
||||||
core.handle_urls(kwargs["urls"])
|
core.handle_urls(kwargs["urls"])
|
||||||
|
|
||||||
|
if kwargs['text'] is not None:
|
||||||
if os.path.isfile(kwargs['text']):
|
if os.path.isfile(kwargs['text']):
|
||||||
logger.debug(f"Handling {kwargs['text']}")
|
logger.debug(f"Handling {kwargs['text']}")
|
||||||
core.handle_txt(kwargs['text'])
|
core.handle_txt(kwargs['text'])
|
||||||
elif kwargs['txt'] is not None:
|
else:
|
||||||
click.secho(f"Text file {kwargs['text']} does not exist.")
|
click.secho(f"Text file {kwargs['text']} does not exist.")
|
||||||
|
|
||||||
if ctx.invoked_subcommand is None:
|
if ctx.invoked_subcommand is None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue