Merge branch 'next'
Conflicts: Changelog.draft.rst
This commit is contained in:
commit
3f98adc4dc
@ -18,3 +18,9 @@ Changes
|
|||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
* [Blinkenlights UI] Abort sleep led to crash ('abort_signal' not existing),
|
||||||
|
regression from 6.5.0.
|
||||||
|
|
||||||
|
* [Blinkenlights UI] Make exit via 'q' key work again cleanly
|
||||||
|
regression from 6.5.0.
|
||||||
|
@ -157,11 +157,13 @@ class CursesAccountFrame:
|
|||||||
return tf
|
return tf
|
||||||
|
|
||||||
def sleeping(self, sleepsecs, remainingsecs):
|
def sleeping(self, sleepsecs, remainingsecs):
|
||||||
# show how long we are going to sleep and sleep
|
"""show how long we are going to sleep and sleep
|
||||||
|
|
||||||
|
:returns: Boolean, whether we want to abort the sleep"""
|
||||||
self.drawleadstr(remainingsecs)
|
self.drawleadstr(remainingsecs)
|
||||||
self.ui.exec_locked(self.window.refresh)
|
self.ui.exec_locked(self.window.refresh)
|
||||||
time.sleep(sleepsecs)
|
time.sleep(sleepsecs)
|
||||||
return self.account.abort_signal.is_set()
|
return self.account.get_abort_event()
|
||||||
|
|
||||||
def syncnow(self):
|
def syncnow(self):
|
||||||
"""Request that we stop sleeping asap and continue to sync"""
|
"""Request that we stop sleeping asap and continue to sync"""
|
||||||
@ -485,11 +487,9 @@ class Blinkenlights(UIBase, CursesUtil):
|
|||||||
if key < 1 or key > 255:
|
if key < 1 or key > 255:
|
||||||
return
|
return
|
||||||
if chr(key) == 'q':
|
if chr(key) == 'q':
|
||||||
# Request to quit.
|
# Request to quit completely.
|
||||||
#TODO: this causes us to bail out in main loop when the thread exits
|
self.warn("Requested shutdown via 'q'")
|
||||||
#TODO: review and rework this mechanism.
|
offlineimap.accounts.Account.set_abort_event(self.config, 3)
|
||||||
currentThread().set_exit_exception(SystemExit("User requested shutdown"))
|
|
||||||
self.terminate()
|
|
||||||
try:
|
try:
|
||||||
index = int(chr(key))
|
index = int(chr(key))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
Reference in New Issue
Block a user