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 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
|
# use the trio async loop
|
||||||
os.environ['KIVY_EVENTLOOP'] = 'trio'
|
os.environ['KIVY_EVENTLOOP'] = 'trio'
|
||||||
|
|
|
@ -252,8 +252,7 @@ async def _async_main(
|
||||||
quotes
|
quotes
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
# Trio-kivy entry point.
|
await async_runTouchApp(widgets['root'])
|
||||||
await async_runTouchApp(widgets['root']) # run kivy
|
|
||||||
finally:
|
finally:
|
||||||
# cancel remote data feed task
|
# cancel remote data feed task
|
||||||
await quote_gen.aclose()
|
await quote_gen.aclose()
|
||||||
|
|
|
@ -498,8 +498,7 @@ async def _async_main(
|
||||||
)
|
)
|
||||||
async with chain.open_rt_display(nursery, symbol):
|
async with chain.open_rt_display(nursery, symbol):
|
||||||
try:
|
try:
|
||||||
# trio-kivy entry point.
|
await async_runTouchApp(chain.widgets['root'])
|
||||||
await async_runTouchApp(chain.widgets['root']) # run kivy
|
|
||||||
finally:
|
finally:
|
||||||
if chain._quote_gen:
|
if chain._quote_gen:
|
||||||
await chain._quote_gen.aclose()
|
await chain._quote_gen.aclose()
|
||||||
|
|
Loading…
Reference in New Issue