Get rid of CommandRunner.run_safely_init
All messages are queued nowadays.
This commit is contained in:
parent
51ea56375e
commit
e63d11527d
@ -280,7 +280,7 @@ def process_pos_args(args, via_ipc=False, cwd=None, target_arg=None):
|
|||||||
win_id = mainwindow.get_window(via_ipc, force_tab=True)
|
win_id = mainwindow.get_window(via_ipc, force_tab=True)
|
||||||
log.init.debug("Startup cmd {!r}".format(cmd))
|
log.init.debug("Startup cmd {!r}".format(cmd))
|
||||||
commandrunner = runners.CommandRunner(win_id)
|
commandrunner = runners.CommandRunner(win_id)
|
||||||
commandrunner.run_safely_init(cmd[1:])
|
commandrunner.run_safely(cmd[1:])
|
||||||
elif not cmd:
|
elif not cmd:
|
||||||
log.init.debug("Empty argument")
|
log.init.debug("Empty argument")
|
||||||
win_id = mainwindow.get_window(via_ipc, force_window=True)
|
win_id = mainwindow.get_window(via_ipc, force_window=True)
|
||||||
|
@ -322,15 +322,3 @@ class CommandRunner(QObject):
|
|||||||
self.run(text, count)
|
self.run(text, count)
|
||||||
except cmdexc.Error as e:
|
except cmdexc.Error as e:
|
||||||
message.error(str(e), stack=traceback.format_exc())
|
message.error(str(e), stack=traceback.format_exc())
|
||||||
|
|
||||||
@pyqtSlot(str, int)
|
|
||||||
def run_safely_init(self, text, count=None):
|
|
||||||
"""Run a command and display exceptions in the statusbar.
|
|
||||||
|
|
||||||
Contrary to run_safely, error messages are queued so this is more
|
|
||||||
suitable to use while initializing.
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
self.run(text, count)
|
|
||||||
except cmdexc.Error as e:
|
|
||||||
message.error(str(e), stack=traceback.format_exc())
|
|
||||||
|
Loading…
Reference in New Issue
Block a user