1
0
mirror of https://github.com/OfflineIMAP/offlineimap.git synced 2024-06-29 07:50:51 +02:00

/offlineimap/head: changeset 323

Due to possibly having one account sleep while another is reading a
password, and other tricky situations, support for nice updating and
cancelling of a sleep in TTY.TTYUI has been removed. However, this is
not going to be a huge problem because the new Curses Blinkenlights
interface has this support, and does it a lot better than TTY.TTYUI
ever could have.
This commit is contained in:
jgoerzen 2003-01-07 03:21:46 +01:00
parent 519a294e38
commit 0c7bdb2630

View File

@ -52,13 +52,6 @@ class TTYUI(UIBase):
finally:
s.outputlock.release()
def sleep(s, sleepsecs):
s.iswaiting = 1
try:
UIBase.sleep(s, sleepsecs)
finally:
s.iswaiting = 0
def mainException(s):
if isinstance(sys.exc_info()[1], KeyboardInterrupt) and \
s.iswaiting:
@ -67,18 +60,3 @@ class TTYUI(UIBase):
else:
UIBase.mainException(s)
def sleeping(s, sleepsecs, remainingsecs):
if remainingsecs > 0:
sys.stdout.write("Next sync in %d:%02d (press Enter to sync now, Ctrl-C to abort) \r" % \
(remainingsecs / 60, remainingsecs % 60))
sys.stdout.flush()
else:
sys.stdout.write("Wait done, proceeding with sync.... \n")
if sleepsecs > 0:
if len(select.select([sys.stdin], [], [], sleepsecs)[0]):
sys.stdin.readline()
return 1
return 0