Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't log traceback when serial port isn't available #5

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
🔇 don't log traceback when serial port isn't available
  • Loading branch information
hairmare committed Aug 29, 2019
commit aae777bc86e572afccd46708e27acf49bac5e44b
3 changes: 1 addition & 2 deletions muuvctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 6,6 @@
import time

import click

import serial

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -39,7 38,7 @@ def get_serial(port):
try:
s = serial.Serial(port=port, baudrate=9600)
except (OSError, serial.SerialException):
logger.exception(f"ERROR: cannot open serial port {port}")
logger.exception(f"ERROR: cannot open serial port {port}", exc_info=False)
sys.exit(1)
# delay for relay to kick in
time.sleep(0.15)
Expand Down