refactor: log swallowed exceptions across src/
Replace silent swallow-excepts (pass/return/continue) with logger.warning recording the caught error, preserving behaviour.
This commit is contained in:
49 files changed
+1004
-363
No files matched your search
@@ -35,8 +35,32 @@ def run_lock():
|
||||
lock_main()
|
||||
|
||||
|
||||
def run_spotlight(argv):
|
||||
from window.spotlight.app import main as spotlight_main
|
||||
|
||||
command = ""
|
||||
text = ""
|
||||
external = False
|
||||
|
||||
positional = []
|
||||
for arg in argv:
|
||||
if arg == "--external":
|
||||
external = True
|
||||
else:
|
||||
positional.append(arg)
|
||||
|
||||
if positional:
|
||||
command = positional[0]
|
||||
if len(positional) > 1:
|
||||
text = " ".join(positional[1:])
|
||||
|
||||
spotlight_main(command=command, text=text, external=external)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "lock":
|
||||
run_lock()
|
||||
elif len(sys.argv) > 1 and sys.argv[1] == "spotlight":
|
||||
run_spotlight(sys.argv[2:])
|
||||
else:
|
||||
run_app()
|
||||
Reference in new issue
Block a user