From c638e25941d3ce927efa6672f474f3e0c6bf03a7 Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Mon, 26 Jan 2015 10:36:11 -0500 Subject: [PATCH] Clean up code Fix typos and remove unused code. --- dotbot/dispatcher.py | 5 +---- dotbot/executor/cleaner.py | 2 +- dotbot/executor/commandrunner.py | 2 +- dotbot/executor/linker.py | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dotbot/dispatcher.py b/dotbot/dispatcher.py index 5218aa1..c3c7fe8 100644 --- a/dotbot/dispatcher.py +++ b/dotbot/dispatcher.py @@ -3,9 +3,6 @@ from .executor import Executor from .messenger import Messenger class Dispatcher(object): - PLUGIN_CLASS = Executor - PLUGIN_DIR = 'dotbot/executor' - def __init__(self, base_directory): self._log = Messenger() self._set_base_directory(base_directory) @@ -17,7 +14,7 @@ class Dispatcher(object): if os.path.exists(path): self._base_directory = path else: - raise DispatchError('Nonexistant base directory') + raise DispatchError('Nonexistent base directory') def dispatch(self, tasks): success = True diff --git a/dotbot/executor/cleaner.py b/dotbot/executor/cleaner.py index 59b9259..79b485f 100644 --- a/dotbot/executor/cleaner.py +++ b/dotbot/executor/cleaner.py @@ -23,7 +23,7 @@ class Cleaner(Executor): if success: self._log.info('All targets have been cleaned') else: - self._log.error('Some targets were not succesfully cleaned') + self._log.error('Some targets were not successfully cleaned') return success def _clean(self, target): diff --git a/dotbot/executor/commandrunner.py b/dotbot/executor/commandrunner.py index 4ca6c83..af4d1ef 100644 --- a/dotbot/executor/commandrunner.py +++ b/dotbot/executor/commandrunner.py @@ -30,5 +30,5 @@ class CommandRunner(Executor): if success: self._log.info('All commands have been executed') else: - self._log.error('Some commands were not sucessfully executed') + self._log.error('Some commands were not successfully executed') return success diff --git a/dotbot/executor/linker.py b/dotbot/executor/linker.py index 8f38c95..d94a9bc 100644 --- a/dotbot/executor/linker.py +++ b/dotbot/executor/linker.py @@ -118,10 +118,10 @@ class Linker(Executor): (link_name, self._link_destination(link_name))) elif not self._exists(source): if self._is_link(link_name): - self._log.warning('Nonexistant target %s -> %s' % + self._log.warning('Nonexistent target %s -> %s' % (link_name, source)) else: - self._log.warning('Nonexistant target for %s : %s' % + self._log.warning('Nonexistent target for %s : %s' % (link_name, source)) else: self._log.lowinfo('Link exists %s -> %s' % (link_name, source))