Update to not send mails in case nothing changes
Future TODO: Send update if expiry is close (< 30 days)
This commit is contained in:
		
					parent
					
						
							
								3cad10d133
							
						
					
				
			
			
				commit
				
					
						782f3202e3
					
				
			
		
					 1 changed files with 10 additions and 11 deletions
				
			
		|  | @ -44,6 +44,7 @@ def main(): | ||||||
|         elif "unexpected error occurred" in line: |         elif "unexpected error occurred" in line: | ||||||
|             state = State.error |             state = State.error | ||||||
| 
 | 
 | ||||||
|  |     if state is not State.no_action: | ||||||
|         text = "\n".join(text) |         text = "\n".join(text) | ||||||
|         subject = SUBJECT.format(str(state)) |         subject = SUBJECT.format(str(state)) | ||||||
|         message = drymail.Message( |         message = drymail.Message( | ||||||
|  | @ -54,8 +55,6 @@ def main(): | ||||||
|             text=text |             text=text | ||||||
|         ) |         ) | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     client = drymail.SMTPMailer( |     client = drymail.SMTPMailer( | ||||||
|         host='localhost') |         host='localhost') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue