diff options
author | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-01-29 22:23:08 +0100 |
---|---|---|
committer | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-01-29 22:23:08 +0100 |
commit | e8135d22b326db94049a44d6ad7ef88c399fe536 (patch) | |
tree | d544fc2bd76867a8bfafa6e5a060cfac61683fac /utilities/blinkenrocket.py | |
parent | f5a4be60a6e0133afe9b0e323e0e1a2047680f9d (diff) |
unittest extended and uncovered some errors. WOW!
Diffstat (limited to 'utilities/blinkenrocket.py')
-rw-r--r-- | utilities/blinkenrocket.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/utilities/blinkenrocket.py b/utilities/blinkenrocket.py index 545d25f..30f90ab 100644 --- a/utilities/blinkenrocket.py +++ b/utilities/blinkenrocket.py @@ -134,7 +134,10 @@ class textFrame(Frame): return [chr(self.speed << 4 | self.delay), chr(self.direction << 4 | 0x00)] def getRepresentation(self): - return self.getHeader().append(list(self.text)) + retval = [] + retval.extend(self.getHeader()) + retval.extend(list(self.text)) + return retval class animationFrame(Frame): animation = [] @@ -163,7 +166,10 @@ class animationFrame(Frame): return [chr(self.speed), chr(self.delay)] def getRepresentation(self): - return self.getHeader().extend(self.animation) + retval = [] + retval.extend(self.getHeader()) + retval.extend(self.animation) + return retval class blinkenrocket(): @@ -180,7 +186,7 @@ class blinkenrocket(): if not isinstance(frame, Frame): raise RuntimeError("Incorrect frame supplied") else: - frames.append(frame) + self.frames.append(frame) def getMessage(self): output = [self.startcode, self.startcode] |