Skip to content
Open
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
2 changes: 1 addition & 1 deletion octoprint_octolapse/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def _test_web_camera(camera_profile, timeout_seconds=2, is_before_print_test=Fal
message = "The request contained no data for the '{0}' camera profile.".format(camera_profile.name)
logger.error(message)
raise CameraError('request-contained-no-data', message)
elif "image/jpeg" not in r.headers["content-type"].lower():
elif 'content-type' in r.headers and "image/jpeg" not in r.headers["content-type"].lower():
message = (
"The returned data was not an image for the '{0}' camera profile.".format(camera_profile.name)
)
Expand Down