mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	fixup: require usage of PAPERLESS_EMAIL_SECRET
This commit is contained in:
		
							parent
							
								
									bccac5017c
								
							
						
					
					
						commit
						0559204be4
					
				@ -42,7 +42,7 @@ class Message(Loggable):
 | 
				
			|||||||
    and n attachments, and that we don't care about the message body.
 | 
					    and n attachments, and that we don't care about the message body.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SECRET = os.getenv("PAPERLESS_EMAIL_SECRET", "")
 | 
					    SECRET = os.getenv("PAPERLESS_EMAIL_SECRET")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, data, group=None):
 | 
					    def __init__(self, data, group=None):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
@ -162,6 +162,8 @@ class MailFetcher(Loggable):
 | 
				
			|||||||
        self._inbox = os.getenv("PAPERLESS_CONSUME_MAIL_INBOX", "INBOX")
 | 
					        self._inbox = os.getenv("PAPERLESS_CONSUME_MAIL_INBOX", "INBOX")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self._enabled = bool(self._host)
 | 
					        self._enabled = bool(self._host)
 | 
				
			||||||
 | 
					        if self._enabled and Message.SECRET is None:
 | 
				
			||||||
 | 
					            raise MailFetcherError("No PAPERLESS_EMAIL_SECRET defined")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.last_checked = time.time()
 | 
					        self.last_checked = time.time()
 | 
				
			||||||
        self.consume = consume
 | 
					        self.consume = consume
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user