Skip to content

Commit

Permalink
Fixed bug reported in #9
Browse files Browse the repository at this point in the history
  • Loading branch information
Askannz committed Oct 28, 2018
1 parent d34ef15 commit 2e6b6bf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions msi_perkeyrgb/msi_perkeyrgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ def main():

# Parse USB vendor/product ID
if not args.id:
usb_id = parse_usb_id(DEFAULT_ID)
id_str = DEFAULT_ID
else:
try:
usb_id = parse_usb_id(args.id)
except UnknownIdError:
print("Unknown vendor/product ID : %s" % args.id)
sys.exit(1)
id_str = args.id

try:
usb_id = parse_usb_id(id_str)
except UnknownIdError:
print("Unknown vendor/product ID : %s" % usb_id)
sys.exit(1)

# Loading presets
msi_presets = MSI_Keyboard.get_model_presets(msi_model)
Expand Down

0 comments on commit 2e6b6bf

Please sign in to comment.