Skip to content

Commit

Permalink
Fix the formatting of some PID values in some Python exceptions
Browse files Browse the repository at this point in the history
(cherry picked from commit 3d070a6)
  • Loading branch information
peternewman committed Apr 21, 2024
1 parent 425d7f6 commit 548bd22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/ola/PidStore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ def LoadFile(self, pid_file_name, validate, override=False):
if validate:
if ((pid_pb.value >= RDMConstants.RDM_MANUFACTURER_PID_MIN) and
(pid_pb.value <= RDMConstants.RDM_MANUFACTURER_PID_MAX)):
raise InvalidPidFormat('%0x04hx between %0x04hx and %0x04hx in %s' %
raise InvalidPidFormat('0x%04hx between 0x%04hx and 0x%04hx in %s' %
(pid_pb.value,
RDMConstants.RDM_MANUFACTURER_PID_MIN,
RDMConstants.RDM_MANUFACTURER_PID_MAX,
Expand Down Expand Up @@ -1103,7 +1103,7 @@ def LoadFile(self, pid_file_name, validate, override=False):
if ((pid_pb.value < RDMConstants.RDM_MANUFACTURER_PID_MIN) or
(pid_pb.value > RDMConstants.RDM_MANUFACTURER_PID_MAX)):
raise InvalidPidFormat(
'Manufacturer pid 0x%04hx not between %0x04hx and %0x04hx' %
'Manufacturer pid 0x%04hx not between 0x%04hx and 0x%04hx' %
(pid_pb.value,
RDMConstants.RDM_MANUFACTURER_PID_MIN,
RDMConstants.RDM_MANUFACTURER_PID_MAX))
Expand Down

0 comments on commit 548bd22

Please sign in to comment.