Skip to content

Commit

Permalink
Slight change for pylint import issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuot committed Jul 22, 2024
1 parent d095626 commit ebdab04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion macropad/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
try:
from adafruit_macropad import MacroPad
except ImportError:
print("Failed to import 'adafruit_macropad'.")
print("Failed to import 'adafruit_macropad'. Please install it.")
sys.exit(1)

macropad = MacroPad()
Expand Down
13 changes: 7 additions & 6 deletions padactions.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'''This module will listen for a MacroPad keys and perform actions'''
import sys
# import sys
import hid
import actions
from actions.actions import lightson, lightsoff

try:
import hid
except ImportError:
print("Failed to import 'hid'. Ensure the 'hidapi' library is installed.")
sys.exit(1)
# try:
# import hid
# except ImportError:
# print("Failed to import 'hid'. Ensure the 'hidapi' library is installed.")
# sys.exit(1)

# Define the vendor ID and product ID for the MacroPad
VENDOR_ID = 0x239A # Adafruit vendor ID (9114 in decimal)
Expand Down

0 comments on commit ebdab04

Please sign in to comment.