From 6c5208802367fe5824ebf447c3295c00c520710d Mon Sep 17 00:00:00 2001 From: Shy Date: Mon, 27 Mar 2017 16:01:55 +0200 Subject: [PATCH] Do not print warnings when truncating payloads --- c4ctrl.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/c4ctrl.py b/c4ctrl.py index 3326024..1f47271 100755 --- a/c4ctrl.py +++ b/c4ctrl.py @@ -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.