Skip to content
Permalink
Browse files

actually read last_deploy

  • Loading branch information
ralsina committed Jan 26, 2016
1 parent cd8b5ea commit a4a456a93019ae231b9513a4b38bcad4aa270810
Showing with 4 additions and 4 deletions.
  1. +4 −4 nikola/plugins/command/deploy.py
@@ -38,7 +38,7 @@
from blinker import signal

from nikola.plugin_categories import Command
from nikola.utils import get_logger, remove_file, unicode_str, makedirs, STDERR_HANDLER
from nikola.utils import get_logger, remove_file, makedirs, STDERR_HANDLER


class CommandDeploy(Command):
@@ -56,7 +56,7 @@ def _execute(self, command, args):
self.logger = get_logger('deploy', STDERR_HANDLER)
# Get last successful deploy date
timestamp_path = os.path.join(self.site.config['CACHE_FOLDER'], 'lastdeploy')

# Get last-deploy from persistent state
last_deploy = self.site.state.get('last_deploy')
if last_deploy is None:
@@ -65,7 +65,7 @@ def _execute(self, command, args):
if os.path.isfile(timestamp_path):
try:
with io.open(timestamp_path, 'r', encoding='utf8') as inf:
last_deploy = dateutil.parser.parse(last_deploy)
last_deploy = dateutil.parser.parse(inf.read())
clean = False
except (IOError, Exception) as e:
self.logger.debug("Problem when reading `{0}`: {1}".format(timestamp_path, e))
@@ -78,7 +78,7 @@ def _execute(self, command, args):
else:
last_deploy = dateutil.parser.parse(last_deploy)
clean = False

if self.site.config['COMMENT_SYSTEM_ID'] == 'nikolademo':
self.logger.warn("\nWARNING WARNING WARNING WARNING\n"
"You are deploying using the nikolademo Disqus account.\n"

0 comments on commit a4a456a

Please sign in to comment.
You can’t perform that action at this time.