aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/command/deploy.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-06-13 21:51:04 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-06-13 21:51:04 -0300
commit3dddbd8cc879402c2047919bccd20e6697082657 (patch)
tree38d6290f37be1d67d91c46027974e6ee3372e232 /nikola/plugins/command/deploy.py
parent7ac2cf148f7a8ea0de126fed3360b49964ce9b45 (diff)
parent58c4878526dec5510f23c812274686787d8724ba (diff)
Merge tag 'upstream/7.0.1'
Upstream version 7.0.1
Diffstat (limited to 'nikola/plugins/command/deploy.py')
-rw-r--r--nikola/plugins/command/deploy.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/nikola/plugins/command/deploy.py b/nikola/plugins/command/deploy.py
index bd1c15f..1bec1d3 100644
--- a/nikola/plugins/command/deploy.py
+++ b/nikola/plugins/command/deploy.py
@@ -31,7 +31,6 @@ import os
import sys
import subprocess
import time
-import pytz
from blinker import signal
@@ -62,10 +61,10 @@ class CommandDeploy(Command):
deploy_drafts = self.site.config.get('DEPLOY_DRAFTS', True)
deploy_future = self.site.config.get('DEPLOY_FUTURE', False)
+ undeployed_posts = []
if not (deploy_drafts and deploy_future):
# Remove drafts and future posts
out_dir = self.site.config['OUTPUT_FOLDER']
- undeployed_posts = []
self.site.scan_posts()
for post in self.site.timeline:
if (not deploy_drafts and post.is_draft) or \
@@ -114,9 +113,6 @@ class CommandDeploy(Command):
"""
- if undeployed is None:
- undeployed = []
-
event = {
'last_deploy': last_deploy,
'new_deploy': new_deploy,
@@ -124,11 +120,9 @@ class CommandDeploy(Command):
'undeployed': undeployed
}
- tzinfo = pytz.timezone(self.site.config['TIMEZONE'])
-
deployed = [
entry for entry in self.site.timeline
- if entry.date > (last_deploy.replace(tzinfo=tzinfo) if tzinfo else last_deploy) and entry not in undeployed
+ if entry.date > last_deploy.replace(tzinfo=self.site.tzinfo) and entry not in undeployed
]
event['deployed'] = deployed