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.
|
"""Merge hex color value into hex template.
|
||||||
|
|
||||||
Expand 4 bit hex code notation (eg. #f0f) and pad with template."""
|
Expand 4 bit hex code notation (eg. #f0f) and pad with template."""
|
||||||
if len(color) > len(self.template): # Truncate
|
if len(color) > len(self.template):
|
||||||
print("Warning: truncating color value {} to {}".format(
|
# Silently truncate
|
||||||
color, color[:len(self.template)]), file=sys.stderr)
|
|
||||||
return color[:len(self.template)]
|
return color[:len(self.template)]
|
||||||
|
|
||||||
# Expand 3 char codes and codes of half the required length.
|
# Expand 3 char codes and codes of half the required length.
|
||||||
|
|
Loading…
Reference in a new issue