Code scan fixes (#18398)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
14ca9415e9
commit
9935b45377
5 changed files with 10 additions and 11 deletions
|
|
@ -135,10 +135,9 @@ class SecurityAlarm(BaseSolution):
|
|||
self.annotator.box_label(box, label=self.names[cls], color=colors(cls, True))
|
||||
|
||||
total_det = len(self.clss)
|
||||
if total_det > self.records: # Only send email If not sent before
|
||||
if not self.email_sent:
|
||||
self.send_email(im0, total_det)
|
||||
self.email_sent = True
|
||||
if total_det > self.records and not self.email_sent: # Only send email If not sent before
|
||||
self.send_email(im0, total_det)
|
||||
self.email_sent = True
|
||||
|
||||
self.display_output(im0) # display output with base class function
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue