diff --git a/dotbot/executor/commandrunner.py b/dotbot/executor/commandrunner.py index 3051ace..4ca6c83 100644 --- a/dotbot/executor/commandrunner.py +++ b/dotbot/executor/commandrunner.py @@ -6,11 +6,13 @@ class CommandRunner(Executor): Run arbitrary shell commands. ''' + _directive = 'shell' + def can_handle(self, directive): - return directive == 'shell' + return directive == self._directive def handle(self, directive, data): - if directive != 'shell': + if directive != self._directive: raise ValueError('CommandRunner cannot handle directive %s' % directive) return self._process_commands(data) diff --git a/dotbot/executor/linker.py b/dotbot/executor/linker.py index 9890ed5..662683f 100644 --- a/dotbot/executor/linker.py +++ b/dotbot/executor/linker.py @@ -6,11 +6,13 @@ class Linker(Executor): Symbolically links dotfiles. ''' + _directive = 'link' + def can_handle(self, directive): - return directive == 'link' + return directive == self._directive def handle(self, directive, data): - if directive != 'link': + if directive != self._directive: raise ValueError('Linker cannot handle directive %s' % directive) return self._process_links(data)