From ab5165c215afef4f2bfa0b7e3859e055da493da6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 16 Aug 2016 12:38:01 +0200 Subject: Fix libcoopgamma.py + finish makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libcoopgamma.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/libcoopgamma.py b/src/libcoopgamma.py index fe3e57a..162fa23 100644 --- a/src/libcoopgamma.py +++ b/src/libcoopgamma.py @@ -447,7 +447,7 @@ class FilterTable: and `filters[0].priority` are undefined. ''' def __init__(self, red_size : int = None, green_size : int = None, blue_size : int = None, - depth : Depth = None, filters : list): + depth : Depth = None, filters : list = None): ''' Constructor @@ -466,7 +466,10 @@ class FilterTable: self.green_size = green_size self.blue_size = blue_size self.depth = depth - self.filters = list(QueriedFilter(*f) if isinstance(f, tuple) else f for f in filters) + if filters is None: + self.filters + else: + self.filters = list(QueriedFilter(*f) if isinstance(f, tuple) else f for f in filters) def make_ramps(self) -> Ramps: ''' @@ -939,7 +942,7 @@ class Context: (successful, value) = value if successful: raise ErrorReport.create_error(value) - return FilterTable:(*value) + return FilterTable(*value) def get_gamma_sync(self, query : FilterQuery) -> FilterTable: ''' -- cgit v1.2.3-70-g09d2