Skip to content

Commit

Permalink
resolve key error with controls
Browse files Browse the repository at this point in the history
  • Loading branch information
engineerjoe440 committed Dec 17, 2023
1 parent 9df817e commit 1b0be5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion selprotopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from selprotopy.support import telnet

# Describe Package for External Interpretation
__version__ = "0.1.2"
__version__ = "0.1.3"

# `telnetlib` Discards Null Characters, but SEL Protocol Requires them
telnetlib.Telnet.process_rawq = telnet.process_rawq
5 changes: 4 additions & 1 deletion selprotopy/protocol/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ def prepare_fastop_command(
command_opt = command.value
except AttributeError:
command_opt = str(command)
control = fastop_def['remotebitconfig'][control_point-1][command_opt]
command_opt = command_opt.lower()
remote_bit_def = fastop_def['remotebitconfig']
control_point_def = remote_bit_def[control_point - 1]
control = control_point_def[command_opt]
print("control", control)
except KeyError as err:
raise ValueError("Improper command type for control point.") from err
Expand Down

0 comments on commit 1b0be5a

Please sign in to comment.