Skip to content

Commit

Permalink
Adjust to busylight changes
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Feb 23, 2023
1 parent 08771a3 commit 585c0ad
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.agile_innovative import BlinkStick as api

try:
api.first_light().acquire()
api.first_light()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('agile_innovative.blinkstick') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/compulab/fit_statusb/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.compulab import Fit_StatUSB as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('compulab.fit_statusb') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/embrava/blynclight/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.embrava import Blynclight as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('embrava.blynclight') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/embrava/blynclight_mini/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.embrava import Blynclight_Mini as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('embrava.blynclight_mini') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/embrava/blynclight_plus/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.embrava import Blynclight_Plus as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('embrava.blynclight_plus') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/kuando/busylight_alpha/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.kuando import Busylight_Alpha as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('kuando.busylight_alpha') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/kuando/busylight_omega/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.kuando import Busylight_Alpha as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('kuando.busylight_omega') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
6 changes: 3 additions & 3 deletions chroma_feedback/consumer/luxafor/flag/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ def get_api() -> Any:

def api_factory() -> Any:
try:
from busylight.lights import LightUnavailable, LightNotFound
from busylight.lights import NoLightsFound, LightUnavailable
from busylight.lights.luxafor import Flag as api

try:
api.first_light().acquire()
except (LightUnavailable, LightNotFound):
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('luxafor.flag') + wording.get('exclamation_mark'))
sys.exit()
return api
Expand Down
6 changes: 3 additions & 3 deletions chroma_feedback/consumer/luxafor/mute/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ def get_api() -> Any:

def api_factory() -> Any:
try:
from busylight.lights import LightUnavailable, LightNotFound
from busylight.lights import NoLightsFound, LightUnavailable
from busylight.lights.luxafor import Mute as api

try:
api.first_light().acquire()
except (LightUnavailable, LightNotFound):
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('luxafor.mute') + wording.get('exclamation_mark'))
sys.exit()
return api
Expand Down
6 changes: 3 additions & 3 deletions chroma_feedback/consumer/luxafor/orb/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ def get_api() -> Any:

def api_factory() -> Any:
try:
from busylight.lights import LightUnavailable, LightNotFound
from busylight.lights import LightUnavailable, NoLightsFound
from busylight.lights.luxafor import Orb as api

try:
api.first_light().acquire()
except (LightUnavailable, LightNotFound):
api.first_light().release()
except (LightUnavailable, NoLightsFound):
logger.error(wording.get('connection_not_found').format('luxafor.orb') + wording.get('exclamation_mark'))
sys.exit()
return api
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/muteme/muteme/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.muteme import MuteMe as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('muteme') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/muteme/muteme_mini/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.muteme import MuteMe_Mini as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('muteme.muteme_mini') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/mutesync/mutesync/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.mutesync import MuteSync as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('mutesync') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.plantronics import Status_Indicator as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('plantronics.status_indicator') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/consumer/thingm/blink1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def api_factory() -> Any:
from busylight.lights.thingm import Blink1 as api

try:
api.first_light().acquire()
api.first_light().release()
except (NoLightsFound, LightUnavailable):
logger.error(wording.get('connection_not_found').format('thingm.blink1') + wording.get('exclamation_mark'))
sys.exit()
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from logging import basicConfig, DEBUG, ERROR, getLogger, INFO, Logger, WARNING
from logging import basicConfig, getLogger, Logger, DEBUG, INFO, WARNING, ERROR
from typing import Any

from chroma_feedback.typing import LogLevel
Expand Down

0 comments on commit 585c0ad

Please sign in to comment.