Skip to content

Commit

Permalink
Merge pull request #61 from echo1consulting/master-keyboard-catch
Browse files Browse the repository at this point in the history
Catch keyboard exit
  • Loading branch information
naisy authored Dec 12, 2018
2 parents 8297770 + 94f8f90 commit 2eda8a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/detection_nms_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ def start(self, cfg):
"""
END while
"""
except KeyboardInterrupt:
pass
except:
import traceback
traceback.print_exc()
Expand Down
4 changes: 4 additions & 0 deletions lib/mpfps.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def process_fps_counter(self):
MPVariable.vis_fps.value = 0
MPVariable.vis_skip_rate.value = 0
previos_work_time = now_time
except KeyboardInterrupt:
pass
except Exception as e:
import traceback
traceback.print_exc()
Expand Down Expand Up @@ -258,6 +260,8 @@ def process_fps_console(self):
MPVariable.vis_proc_time.value = 0
MPVariable.vis_drop_frames.value = 0
previos_work_time = now_time
except KeyboardInterrupt:
pass
except Exception as e:
import traceback
traceback.print_exc()
Expand Down

0 comments on commit 2eda8a4

Please sign in to comment.