You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
appstore: move to onResume()
This commit is contained in:
@@ -29,7 +29,9 @@ class AppStore(Activity):
|
||||
self.please_wait_label.center()
|
||||
self.setContentView(self.main_screen)
|
||||
|
||||
def onStart(self, screen):
|
||||
def onResume(self, screen):
|
||||
if len(self.apps):
|
||||
return
|
||||
try:
|
||||
import network
|
||||
except Exception as e:
|
||||
@@ -46,6 +48,7 @@ class AppStore(Activity):
|
||||
print("appstore.py ending")
|
||||
|
||||
def download_app_index(self, json_url):
|
||||
#time.sleep(5)
|
||||
try:
|
||||
response = requests.get(json_url, timeout=10)
|
||||
except Exception as e:
|
||||
|
||||
@@ -25,7 +25,7 @@ def execute_script(script_source, is_file, cwd=None, classname=None):
|
||||
try:
|
||||
if is_file:
|
||||
print(f"Thread {thread_id}: reading script from file {script_source}")
|
||||
with open(script_source, 'r') as f: # TODO: check if file exists first?
|
||||
with open(script_source, 'r') as f: # No need to check if it exists as exceptions are caught
|
||||
script_source = f.read()
|
||||
script_globals = {
|
||||
'lv': lv,
|
||||
|
||||
Reference in New Issue
Block a user