From 5b087844989fa4b3f5e44ef3650221189f9ca714 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Tue, 29 Nov 2022 23:08:31 +1100 Subject: [PATCH] Ignore ModuleNotFoundError in yli.reload --- yli/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yli/__init__.py b/yli/__init__.py index 73724dd..baa73ad 100644 --- a/yli/__init__.py +++ b/yli/__init__.py @@ -28,4 +28,7 @@ def reload_me(): for k, v in list(sys.modules.items()): if k == 'yli' or k.startswith('yli.'): - importlib.reload(v) + try: + importlib.reload(v) + except ModuleNotFoundError: + pass