mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	remove uneeded print and fix merge fail
This commit is contained in:
		
							parent
							
								
									942b5aa9df
								
							
						
					
					
						commit
						5fcf1b5434
					
				@ -90,18 +90,14 @@ def make_criterias(rule):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def get_mailbox(server, port, security):
 | 
			
		||||
    try:
 | 
			
		||||
        if security == MailAccount.IMAP_SECURITY_NONE:
 | 
			
		||||
    if security == MailAccount.ImapSecurity.NONE:
 | 
			
		||||
        mailbox = MailBoxUnencrypted(server, port)
 | 
			
		||||
        elif security == MailAccount.IMAP_SECURITY_STARTTLS:
 | 
			
		||||
    elif security == MailAccount.ImapSecurity.STARTTLS:
 | 
			
		||||
        mailbox = MailBoxTls(server, port)
 | 
			
		||||
        elif security == MailAccount.IMAP_SECURITY_SSL:
 | 
			
		||||
    elif security == MailAccount.ImapSecurity.SSL:
 | 
			
		||||
        mailbox = MailBox(server, port)
 | 
			
		||||
    else:
 | 
			
		||||
        raise NotImplementedError("Unknown IMAP security")  # pragma: nocover
 | 
			
		||||
    except Exception as e:
 | 
			
		||||
        print(f"Error while retrieving mailbox from {server}: {e}")
 | 
			
		||||
        raise
 | 
			
		||||
    return mailbox
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user