Add yappi dependency for "nilmdb-server -y", but don't require ipython

This commit is contained in:
Jim Paris 2020-08-06 22:55:27 -04:00
parent 8dfb8da15c
commit 88466dcafe
2 changed files with 7 additions and 3 deletions

View File

@ -78,9 +78,12 @@ def main():
stats = yappi.get_func_stats()
stats.sort("ttot")
stats.print_all()
from IPython import embed
embed(header="Use the `yappi` or `stats` object to explore "
try:
from IPython import embed
embed(header="Use the `yappi` or `stats` object to explore "
"further, quit to exit")
except ModuleNotFoundError:
print("\nInstall ipython to explore further")
else:
server.start(blocking=True)
except nilmdb.server.serverutil.CherryPyExit:

View File

@ -13,7 +13,7 @@ python-datetime-tz==0.5.4
python-dateutil==2.8.1
requests==2.24.0
tz==0.2.2
WebTest==2.0.35
yappi==1.2.5
## The following requirements were added by pip freeze:
beautifulsoup4==4.9.1
@ -37,4 +37,5 @@ tempora==4.0.0
urllib3==1.25.10
waitress==1.4.4
WebOb==1.8.6
WebTest==2.0.35
zc.lockfile==2.0