mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 21:31:31 +00:00
Expose FileManager exclude as a property
This commit is contained in:
parent
e3c533de76
commit
4b8b71d967
@ -9,12 +9,21 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class FileManager:
|
class FileManager:
|
||||||
def __init__(self, working_directory, selected_file=None, exclude=None):
|
def __init__(self, working_directory, selected_file=None, exclude=()):
|
||||||
self.exclude = exclude if exclude is not None else []
|
self._exclude = None
|
||||||
|
self.exclude = exclude
|
||||||
self._workdir = None
|
self._workdir = None
|
||||||
self.workdir = working_directory
|
self.workdir = working_directory
|
||||||
self.filename = selected_file or self.files[0]
|
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
|
@property
|
||||||
def workdir(self):
|
def workdir(self):
|
||||||
return self._workdir
|
return self._workdir
|
||||||
|
Loading…
Reference in New Issue
Block a user