Added stage tests and tidied up rescue
This commit is contained in:
parent
70437212b1
commit
0989a50558
4 changed files with 69 additions and 36 deletions
|
|
@ -1,5 +1,10 @@
|
|||
import logging
|
||||
|
||||
from .error_sources import ErrorSource, WarningSource
|
||||
|
||||
picamera_import_error = ErrorSource(
|
||||
"Picamera module could not be imported. Check physical connections to the camera as it may be damaged."
|
||||
)
|
||||
|
||||
def main():
|
||||
error_sources = []
|
||||
|
|
@ -11,6 +16,6 @@ def main():
|
|||
# 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
|
||||
logging.error(e)
|
||||
error_sources.append("picamera_import_error")
|
||||
error_sources.append(picamera_import_error)
|
||||
|
||||
return error_sources
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue