PyCharm Code Inspect fixes for Solutions and Examples (#18393)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
3e65fc2421
commit
b1af683d7a
13 changed files with 92 additions and 62 deletions
|
|
@ -34,6 +34,9 @@ class SecurityAlarm(BaseSolution):
|
|||
super().__init__(**kwargs)
|
||||
self.email_sent = False
|
||||
self.records = self.CFG["records"]
|
||||
self.server = None
|
||||
self.to_email = ""
|
||||
self.from_email = ""
|
||||
|
||||
def authenticate(self, from_email, password, to_email):
|
||||
"""
|
||||
|
|
@ -91,7 +94,7 @@ class SecurityAlarm(BaseSolution):
|
|||
|
||||
# Add the text message body
|
||||
message_body = f"Ultralytics ALERT!!! " f"{records} objects have been detected!!"
|
||||
message.attach(MIMEText(message_body, "plain"))
|
||||
message.attach(MIMEText(message_body))
|
||||
|
||||
# Attach the image
|
||||
image_attachment = MIMEImage(img_bytes, name="ultralytics.jpg")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue