fixing writing ot file
This commit is contained in:
2
setup.py
2
setup.py
@@ -6,7 +6,7 @@ with open('README.md') as file:
|
||||
|
||||
setup(
|
||||
name="tatt",
|
||||
version="0.951",
|
||||
version="0.953",
|
||||
py_modules=['tatt'],
|
||||
url='https://github.com/zevaverbach/tatt',
|
||||
install_requires=[
|
||||
|
||||
@@ -25,11 +25,16 @@ def get(name, save):
|
||||
except exceptions.NotAvailable as e:
|
||||
raise click.ClickException(str(e))
|
||||
|
||||
filepath = None
|
||||
file = None
|
||||
if save:
|
||||
filepath = f'{name}.json'
|
||||
filepath = f'{name}.json', 'w'
|
||||
file = open(filepath)
|
||||
|
||||
click.echo(transcript, file=filepath)
|
||||
click.echo(transcript, file=file)
|
||||
|
||||
if file:
|
||||
click.echo(f'Saved transcript to {filepath}.')
|
||||
file.close()
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user