diff --git a/lib/tfw/components/source_code_event_handler.py b/lib/tfw/components/source_code_event_handler.py index 5ff61e8..f700324 100644 --- a/lib/tfw/components/source_code_event_handler.py +++ b/lib/tfw/components/source_code_event_handler.py @@ -9,12 +9,21 @@ log = logging.getLogger(__name__) class FileManager: - def __init__(self, working_directory, selected_file=None, exclude=None): - self.exclude = exclude if exclude is not None else [] + def __init__(self, working_directory, selected_file=None, exclude=()): + self._exclude = None + self.exclude = exclude self._workdir = None self.workdir = working_directory self.filename = selected_file or self.files[0] + @property + def exclude(self): + return self._exclude + + @exclude.setter + def exclude(self, *exclude): + self._exclude = exclude + @property def workdir(self): return self._workdir