Do not print warnings when truncating payloads
This commit is contained in:
parent
44a78e50cd
commit
6c52088023
1 changed files with 2 additions and 3 deletions
|
@ -122,9 +122,8 @@ class Dmx:
|
|||
"""Merge hex color value into hex template.
|
||||
|
||||
Expand 4 bit hex code notation (eg. #f0f) and pad with template."""
|
||||
if len(color) > len(self.template): # Truncate
|
||||
print("Warning: truncating color value {} to {}".format(
|
||||
color, color[:len(self.template)]), file=sys.stderr)
|
||||
if len(color) > len(self.template):
|
||||
# Silently truncate
|
||||
return color[:len(self.template)]
|
||||
|
||||
# Expand 3 char codes and codes of half the required length.
|
||||
|
|
Loading…
Reference in a new issue