Skip to content

Commit

Permalink
Merge pull request #309 from lucasnz/master
Browse files Browse the repository at this point in the history
fix a bug: Unrecoverable error:local variable 'pred' referenced befor…
  • Loading branch information
pliablepixels authored Oct 14, 2020
2 parents 16bfb8a + 3dbdc50 commit 4bf939b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hook/zm_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ def main_handler():

#g.logger.Debug (1,'FINAL LIST={} AND {}'.format(bbox,label))

# Now create prediction string
pred = ''

if not matched_file:
g.logger.Info('No patterns found using any models in all files')

Expand Down Expand Up @@ -744,8 +747,6 @@ def main_handler():
'Could not write image to ZoneMinder as eventpath not present')


# Now create prediction string
pred = ''
detections = []
seen = {}

Expand Down

0 comments on commit 4bf939b

Please sign in to comment.