change order of urwid client init code to allow thread-invalid message to show first

This commit is contained in:
r 2024-04-29 16:31:24 -05:00
parent 98387ce8a6
commit a3570ecb14
1 changed files with 9 additions and 8 deletions

View File

@ -2748,19 +2748,20 @@ def main():
global app
app = App()
thread_arg = get_arg("thread", False)
if thread_arg:
try:
# check to make sure thread_id exists. will throw
# ValueError if not
thread, usermap = network.thread_load(thread_arg)
app.immediate_thread_load.append(thread_arg)
except ValueError as e:
exit("Specified --thread does not exist")
call("clear", shell=True)
motherfucking_rainbows(obnoxious_logo)
print(welcome_monochrome if app.prefs["monochrome"] or os.getenv("NO_COLOR") else welcome)
try:
log_in()
if thread_arg:
try:
# check to make sure thread_id exists. will throw
# ValueError if not
thread, usermap = network.thread_load(thread_arg)
app.immediate_thread_load.append(thread_arg)
except ValueError as e:
exit("Specified --thread does not exist\n" + repr(e))
app.index()
app.loop.run()
except (InterruptedError, KeyboardInterrupt):