Skip to content

Commit cac3900

Browse files
appstore: move to onResume()
1 parent 21afc8e commit cac3900

File tree

2 files changed

+5
-2
lines changed
  • internal_filesystem

2 files changed

+5
-2
lines changed

internal_filesystem/builtin/apps/com.micropythonos.appstore/assets/appstore.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ def onCreate(self):
2929
self.please_wait_label.center()
3030
self.setContentView(self.main_screen)
3131

32-
def onStart(self, screen):
32+
def onResume(self, screen):
33+
if len(self.apps):
34+
return
3335
try:
3436
import network
3537
except Exception as e:
@@ -46,6 +48,7 @@ def onDestroy(self, screen):
4648
print("appstore.py ending")
4749

4850
def download_app_index(self, json_url):
51+
#time.sleep(5)
4952
try:
5053
response = requests.get(json_url, timeout=10)
5154
except Exception as e:

internal_filesystem/lib/mpos/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def execute_script(script_source, is_file, cwd=None, classname=None):
2525
try:
2626
if is_file:
2727
print(f"Thread {thread_id}: reading script from file {script_source}")
28-
with open(script_source, 'r') as f: # TODO: check if file exists first?
28+
with open(script_source, 'r') as f: # No need to check if it exists as exceptions are caught
2929
script_source = f.read()
3030
script_globals = {
3131
'lv': lv,

0 commit comments

Comments
 (0)