Skip to content

Commit

Permalink
fix #1747
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed May 23, 2015
1 parent 78dbce2 commit 9a8101d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -14,6 +14,7 @@ Features
Bugfixes
--------

* Avoid some rebuild loops (Issue #1747)
* Better error if two posts/pages output conflict (Issue #1749)
* Scanning of posts refactored out of core (Issue #1700)
* github_deploy records lastdeploy timestamp like regular deploy
Expand Down
6 changes: 5 additions & 1 deletion nikola/post.py
Expand Up @@ -235,7 +235,11 @@ def __repr__(self):
m = hashlib.md5()
# source_path modification date (to avoid reading it)
m.update(utils.unicode_str(os.stat(self.source_path).st_mtime).encode('utf-8'))
m.update(utils.unicode_str(json.dumps(self.meta, cls=utils.CustomEncoder, sort_keys=True)).encode('utf-8'))
clean_meta = {}
for k, v in self.meta.items():
if v:
clean_meta[k] = v
m.update(utils.unicode_str(json.dumps(clean_meta, cls=utils.CustomEncoder, sort_keys=True)).encode('utf-8'))
return '<Post: {0} {1}>'.format(self.source_path, m.hexdigest())

def _has_pretty_url(self, lang):
Expand Down

0 comments on commit 9a8101d

Please sign in to comment.