Dies und das
This commit is contained in:
@@ -13,7 +13,7 @@ LATEST_JPEG = None
|
||||
LATEST_LOCK = threading.Lock()
|
||||
|
||||
PORT = 8081
|
||||
CONFIG_FILE = os.path.join(os.path.dirname(__file__), '..', 'config', 'camera_settings.json')
|
||||
RUNTIME_CONFIG_FILE = '/tmp/exomy_camera_settings.json'
|
||||
DEFAULT_CAMERA_SETTINGS = {
|
||||
'width': 1296,
|
||||
'height': 972,
|
||||
@@ -24,7 +24,7 @@ DEFAULT_CAMERA_SETTINGS = {
|
||||
def load_camera_settings():
|
||||
settings = dict(DEFAULT_CAMERA_SETTINGS)
|
||||
try:
|
||||
with open(CONFIG_FILE, 'r', encoding='utf-8') as handle:
|
||||
with open(RUNTIME_CONFIG_FILE, 'r', encoding='utf-8') as handle:
|
||||
raw_settings = json.load(handle)
|
||||
except (FileNotFoundError, json.JSONDecodeError, OSError, ValueError, TypeError):
|
||||
return settings
|
||||
|
||||
Reference in New Issue
Block a user