mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 09:51:32 +00:00
Implement SourceCodeEventHandler blacklist manipulating API
This commit is contained in:
parent
aa54e40f14
commit
cc87540171
@ -77,7 +77,8 @@ class SourceCodeEventHandler(TriggerlessEventHandler):
|
|||||||
self.commands = {'read': self.read,
|
self.commands = {'read': self.read,
|
||||||
'write': self.write,
|
'write': self.write,
|
||||||
'select': self.select,
|
'select': self.select,
|
||||||
'selectdir': self.select_dir}
|
'selectdir': self.select_dir,
|
||||||
|
'exclude': self.exclude}
|
||||||
|
|
||||||
self._monitor = None
|
self._monitor = None
|
||||||
self.reload_monitor()
|
self.reload_monitor()
|
||||||
@ -125,6 +126,11 @@ class SourceCodeEventHandler(TriggerlessEventHandler):
|
|||||||
log.error('Failed to select directory "{}"'.format(data['directory']))
|
log.error('Failed to select directory "{}"'.format(data['directory']))
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
def exclude(self, data):
|
||||||
|
try: self.filemanager.exclude = list(data['exclude'])
|
||||||
|
except TypeError: log.error('Exclude must be Iterable!')
|
||||||
|
return data
|
||||||
|
|
||||||
def attach_fileinfo(self, data):
|
def attach_fileinfo(self, data):
|
||||||
data['filename'] = self.filemanager.filename
|
data['filename'] = self.filemanager.filename
|
||||||
data['files'] = self.filemanager.files
|
data['files'] = self.filemanager.files
|
||||||
|
Loading…
Reference in New Issue
Block a user