Add hack-fix to avoid leaking cmdline flags to kivy
parent
77548d2ee6
commit
747d703d92
|
@ -1,7 +1,13 @@
|
|||
"""
|
||||
Stuff for you eyes.
|
||||
Stuff for your eyes.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
# XXX clear all flags at import to avoid upsetting
|
||||
# ol' kivy see: https://github.com/kivy/kivy/issues/4225
|
||||
# though this is likely a ``click`` problem
|
||||
sys.argv[1:] = []
|
||||
|
||||
# use the trio async loop
|
||||
os.environ['KIVY_EVENTLOOP'] = 'trio'
|
||||
|
|
|
@ -252,8 +252,7 @@ async def _async_main(
|
|||
quotes
|
||||
)
|
||||
try:
|
||||
# Trio-kivy entry point.
|
||||
await async_runTouchApp(widgets['root']) # run kivy
|
||||
await async_runTouchApp(widgets['root'])
|
||||
finally:
|
||||
# cancel remote data feed task
|
||||
await quote_gen.aclose()
|
||||
|
|
|
@ -498,8 +498,7 @@ async def _async_main(
|
|||
)
|
||||
async with chain.open_rt_display(nursery, symbol):
|
||||
try:
|
||||
# trio-kivy entry point.
|
||||
await async_runTouchApp(chain.widgets['root']) # run kivy
|
||||
await async_runTouchApp(chain.widgets['root'])
|
||||
finally:
|
||||
if chain._quote_gen:
|
||||
await chain._quote_gen.aclose()
|
||||
|
|
Loading…
Reference in New Issue