1
0
Fork 0
mirror of synced 2024-12-22 06:01:07 -05:00

Clean up code

Fix typos and remove unused code.
This commit is contained in:
Anish Athalye 2015-01-26 10:36:11 -05:00
parent 2865477dca
commit c638e25941
4 changed files with 5 additions and 8 deletions

View file

@ -3,9 +3,6 @@ from .executor import Executor
from .messenger import Messenger from .messenger import Messenger
class Dispatcher(object): class Dispatcher(object):
PLUGIN_CLASS = Executor
PLUGIN_DIR = 'dotbot/executor'
def __init__(self, base_directory): def __init__(self, base_directory):
self._log = Messenger() self._log = Messenger()
self._set_base_directory(base_directory) self._set_base_directory(base_directory)
@ -17,7 +14,7 @@ class Dispatcher(object):
if os.path.exists(path): if os.path.exists(path):
self._base_directory = path self._base_directory = path
else: else:
raise DispatchError('Nonexistant base directory') raise DispatchError('Nonexistent base directory')
def dispatch(self, tasks): def dispatch(self, tasks):
success = True success = True

View file

@ -23,7 +23,7 @@ class Cleaner(Executor):
if success: if success:
self._log.info('All targets have been cleaned') self._log.info('All targets have been cleaned')
else: else:
self._log.error('Some targets were not succesfully cleaned') self._log.error('Some targets were not successfully cleaned')
return success return success
def _clean(self, target): def _clean(self, target):

View file

@ -30,5 +30,5 @@ class CommandRunner(Executor):
if success: if success:
self._log.info('All commands have been executed') self._log.info('All commands have been executed')
else: else:
self._log.error('Some commands were not sucessfully executed') self._log.error('Some commands were not successfully executed')
return success return success

View file

@ -118,10 +118,10 @@ class Linker(Executor):
(link_name, self._link_destination(link_name))) (link_name, self._link_destination(link_name)))
elif not self._exists(source): elif not self._exists(source):
if self._is_link(link_name): if self._is_link(link_name):
self._log.warning('Nonexistant target %s -> %s' % self._log.warning('Nonexistent target %s -> %s' %
(link_name, source)) (link_name, source))
else: else:
self._log.warning('Nonexistant target for %s : %s' % self._log.warning('Nonexistent target for %s : %s' %
(link_name, source)) (link_name, source))
else: else:
self._log.lowinfo('Link exists %s -> %s' % (link_name, source)) self._log.lowinfo('Link exists %s -> %s' % (link_name, source))