fixing writing ot file

This commit is contained in:
2019-02-20 12:31:31 -05:00
parent 7407a1ecd6
commit 8383e6ebb3
2 changed files with 9 additions and 4 deletions

View File

@@ -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=[

View File

@@ -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()