Skip to content

Commit a4a456a

Browse files
committedJan 26, 2016
actually read last_deploy
1 parent cd8b5ea commit a4a456a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎nikola/plugins/command/deploy.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from blinker import signal
3939

4040
from nikola.plugin_categories import Command
41-
from nikola.utils import get_logger, remove_file, unicode_str, makedirs, STDERR_HANDLER
41+
from nikola.utils import get_logger, remove_file, makedirs, STDERR_HANDLER
4242

4343

4444
class CommandDeploy(Command):
@@ -56,7 +56,7 @@ def _execute(self, command, args):
5656
self.logger = get_logger('deploy', STDERR_HANDLER)
5757
# Get last successful deploy date
5858
timestamp_path = os.path.join(self.site.config['CACHE_FOLDER'], 'lastdeploy')
59-
59+
6060
# Get last-deploy from persistent state
6161
last_deploy = self.site.state.get('last_deploy')
6262
if last_deploy is None:
@@ -65,7 +65,7 @@ def _execute(self, command, args):
6565
if os.path.isfile(timestamp_path):
6666
try:
6767
with io.open(timestamp_path, 'r', encoding='utf8') as inf:
68-
last_deploy = dateutil.parser.parse(last_deploy)
68+
last_deploy = dateutil.parser.parse(inf.read())
6969
clean = False
7070
except (IOError, Exception) as e:
7171
self.logger.debug("Problem when reading `{0}`: {1}".format(timestamp_path, e))
@@ -78,7 +78,7 @@ def _execute(self, command, args):
7878
else:
7979
last_deploy = dateutil.parser.parse(last_deploy)
8080
clean = False
81-
81+
8282
if self.site.config['COMMENT_SYSTEM_ID'] == 'nikolademo':
8383
self.logger.warn("\nWARNING WARNING WARNING WARNING\n"
8484
"You are deploying using the nikolademo Disqus account.\n"

0 commit comments

Comments
 (0)
Please sign in to comment.