Style and linting
This commit is contained in:
parent
f12671fa3f
commit
de135abc95
2 changed files with 28 additions and 21 deletions
|
|
@ -1,17 +1,19 @@
|
|||
import logging
|
||||
|
||||
from .error_sources import ErrorSource, WarningSource
|
||||
from .error_sources import ErrorSource
|
||||
|
||||
picamera_import_error = ErrorSource(
|
||||
"Picamera module could not be imported. Check physical connections to the camera as it may be damaged."
|
||||
("Picamera module could not be imported.",
|
||||
"Check physical connections to the camera as it may be damaged or disconnected.")
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
error_sources = []
|
||||
logging.info("Attempting to import picamera...")
|
||||
|
||||
try:
|
||||
from picamerax import PiCamera
|
||||
from picamerax import PiCamera as _
|
||||
except Exception as e: # pylint: disable=W0703
|
||||
# TODO: Parse exception object for a few different issues, and append different error sources
|
||||
# E.g. pi with camera already in use, disconnected, unsupported OS, etc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue