diff --git a/head/offlineimap/repository/IMAP.py b/head/offlineimap/repository/IMAP.py index df49b58..255192c 100644 --- a/head/offlineimap/repository/IMAP.py +++ b/head/offlineimap/repository/IMAP.py @@ -50,6 +50,6 @@ class IMAPRepository(BaseRepository): continue retval.append(folder.IMAP.IMAPFolder(self.imapserver, name, self.nametrans(imaputil.dequote(name)))) - retval.sort() + retval.sort(lambda x, y: cmp(x.getvisiblename(), y.getvisiblename())) self.folders = retval return retval diff --git a/head/offlineimap/ui/TTY.py b/head/offlineimap/ui/TTY.py index 35f2409..e69f8fc 100644 --- a/head/offlineimap/ui/TTY.py +++ b/head/offlineimap/ui/TTY.py @@ -31,10 +31,11 @@ class TTYUI(UIBase): (remainingsecs / 60, remainingsecs % 60)) sys.stdout.flush() else: - sys.stdout.write("Wait done, proceeding with sync.... ") + 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