mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	fixup: require usage of PAPERLESS_EMAIL_SECRET
This commit is contained in:
		| @@ -42,7 +42,7 @@ class Message(Loggable): | ||||
|     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): | ||||
|         """ | ||||
| @@ -162,6 +162,8 @@ class MailFetcher(Loggable): | ||||
|         self._inbox = os.getenv("PAPERLESS_CONSUME_MAIL_INBOX", "INBOX") | ||||
|  | ||||
|         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.consume = consume | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Erik Arvstedt
					Erik Arvstedt