aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/command/deploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'nikola/plugins/command/deploy.py')
-rw-r--r--nikola/plugins/command/deploy.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/nikola/plugins/command/deploy.py b/nikola/plugins/command/deploy.py
index 2c44e87..821ea11 100644
--- a/nikola/plugins/command/deploy.py
+++ b/nikola/plugins/command/deploy.py
@@ -24,6 +24,8 @@
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""Deploy site."""
+
from __future__ import print_function
import io
from datetime import datetime
@@ -35,11 +37,13 @@ import time
from blinker import signal
from nikola.plugin_categories import Command
-from nikola.utils import get_logger, remove_file, unicode_str, makedirs
+from nikola.utils import get_logger, remove_file, unicode_str, makedirs, STDERR_HANDLER
class CommandDeploy(Command):
+
"""Deploy site."""
+
name = "deploy"
doc_usage = "[[preset [preset...]]"
@@ -48,7 +52,8 @@ class CommandDeploy(Command):
logger = None
def _execute(self, command, args):
- self.logger = get_logger('deploy', self.site.loghandlers)
+ """Execute the deploy command."""
+ self.logger = get_logger('deploy', STDERR_HANDLER)
# Get last successful deploy date
timestamp_path = os.path.join(self.site.config['CACHE_FOLDER'], 'lastdeploy')
if self.site.config['COMMENT_SYSTEM_ID'] == 'nikolademo':
@@ -116,7 +121,7 @@ class CommandDeploy(Command):
outf.write(unicode_str(new_deploy.isoformat()))
def _emit_deploy_event(self, last_deploy, new_deploy, clean=False, undeployed=None):
- """ Emit events for all timeline entries newer than last deploy.
+ """Emit events for all timeline entries newer than last deploy.
last_deploy: datetime
Time stamp of the last successful deployment.
@@ -128,7 +133,6 @@ class CommandDeploy(Command):
True when it appears like deploy is being run after a clean.
"""
-
event = {
'last_deploy': last_deploy,
'new_deploy': new_deploy,