aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/command/deploy.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:41 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:41 -0300
commit0f1e24f7888ba16fe5629c57fd00f0deacb63e5e (patch)
tree7153a3a11b766f375b1d1c0a7adc599e0a9f9c55 /nikola/plugins/command/deploy.py
parent04fc43563d3d5d4218004690b5e14c19c67bdcbc (diff)
parent2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff)
Merge tag 'upstream/6.3.0'
Upstream version 6.3.0
Diffstat (limited to 'nikola/plugins/command/deploy.py')
-rw-r--r--nikola/plugins/command/deploy.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/nikola/plugins/command/deploy.py b/nikola/plugins/command/deploy.py
index efb909d..eb5787e 100644
--- a/nikola/plugins/command/deploy.py
+++ b/nikola/plugins/command/deploy.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright © 2012-2013 Roberto Alsina and others.
+# Copyright © 2012-2014 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
@@ -85,18 +85,17 @@ class Deploy(Command):
sys.exit(e.returncode)
self.logger.notice("Successful deployment")
- if self.site.config['TIMEZONE'] is not None:
- tzinfo = pytz.timezone(self.site.config['TIMEZONE'])
- else:
- tzinfo = pytz.UTC
+ tzinfo = pytz.timezone(self.site.config['TIMEZONE'])
try:
with open(timestamp_path, 'rb') as inf:
last_deploy = literal_eval(inf.read().strip())
- # this might ignore DST
- last_deploy = last_deploy.replace(tzinfo=tzinfo)
+ if tzinfo:
+ last_deploy = last_deploy.replace(tzinfo=tzinfo)
clean = False
except Exception:
- last_deploy = datetime(1970, 1, 1).replace(tzinfo=tzinfo)
+ last_deploy = datetime(1970, 1, 1)
+ if tzinfo:
+ last_deploy = last_deploy.replace(tzinfo=tzinfo)
clean = True
new_deploy = datetime.now()