Declutter TTY output
Previously we would output: Folder sync sspaeth.de[INBOX.INBOX201004]: Syncing INBOX.INBOX201004: IMAP -> Maildir Folder sync sspaeth.de[INBOX.INBOX201006]: Syncing INBOX.INBOX201006: IMAP -> Maildir Folder sync sspaeth.de[INBOX.INBOX201009]: Syncing INBOX.INBOX201009: IMAP -> Maildir which is very repetitive and cluttered. By naming the folder sync threads just according to the account and not the folder, the output looks much nicer: Folder sync [sspaeth.de]: Syncing INBOX.INBOX201004: IMAP -> Maildir Syncing INBOX.INBOX201006: IMAP -> Maildir Syncing INBOX.INBOX201009: IMAP -> Maildir If syncing multiple accounts in parallel, we will still get headers indicating the account: Folder sync [sspaeth.de]: Syncing INBOX: IMAP -> Maildir Syncing INBOX.INBOX201006: IMAP -> Maildir Folder sync [gmail]: Syncing INBOX: IMAP -> Maildir This is a small fix that makes the output much nicer in my opinion. Also don't output the thread name if we are in the MainThread, e.g. when we output the initial offlineimap banner. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
		 Sebastian Spaeth
					Sebastian Spaeth
				
			
				
					committed by
					
						 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
			
				
	
			
			
			 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
						parent
						
							b94bf79258
						
					
				
				
					commit
					efcce01d64
				
			| @@ -41,7 +41,8 @@ class TTYUI(UIBase): | ||||
|                 threadname = currentThread().name | ||||
|             except AttributeError: | ||||
|                 threadname = currentThread().getName() | ||||
|             if (threadname == s._lastThreaddisplay): | ||||
|             if (threadname == s._lastThreaddisplay \ | ||||
|                     or threadname == 'MainThread'): | ||||
|                 print " %s" % msg | ||||
|             else: | ||||
|                 print "%s:\n %s" % (threadname, msg) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user