Loading openflexure_microscope/api/app.py +14 −9 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ from flask import ( Flask, render_template) from flask.logging import default_handler from serial import SerialException from flask_cors import CORS Loading Loading @@ -71,8 +72,12 @@ def attach_microscope(): api_camera = StreamingCamera(config=api_microscope.rc.read()) logging.debug("Creating stage object...") try: api_stage = Stage("/dev/ttyUSB0") except SerialException as e: api_camera.close() raise e else: logging.debug("Attaching devices to microscope...") api_microscope.attach( api_camera, Loading Loading
openflexure_microscope/api/app.py +14 −9 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ from flask import ( Flask, render_template) from flask.logging import default_handler from serial import SerialException from flask_cors import CORS Loading Loading @@ -71,8 +72,12 @@ def attach_microscope(): api_camera = StreamingCamera(config=api_microscope.rc.read()) logging.debug("Creating stage object...") try: api_stage = Stage("/dev/ttyUSB0") except SerialException as e: api_camera.close() raise e else: logging.debug("Attaching devices to microscope...") api_microscope.attach( api_camera, Loading