Skip to content
Permalink
Browse files

upgrade_metadata: support old-style file names

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 22, 2015
1 parent e748c9f commit 2a5db98bd1d48ba625a5dc66833c12086b8c412d
Showing with 3 additions and 3 deletions.
  1. +1 −1 v7/upgrade_metadata/upgrade_metadata.plugin
  2. +2 −2 v7/upgrade_metadata/upgrade_metadata.py
@@ -7,6 +7,6 @@ MinVersion = 7.4.0

[Documentation]
Author = Chris Warrick
Version = 0.1.1
Version = 0.1.2
Website = http://plugins.getnikola.com/#upgrade_metadata
Description = Upgrade old-style metadata
@@ -74,8 +74,8 @@ def _execute(self, options, args):
if lang == post.default_lang:
fname = post.metadata_path
else:
fname, _ = os.path.splitext(post.translated_source_path(lang))
fname += '.meta'
meta_path = os.path.splitext(post.source_path)[0] + '.meta'
fname = utils.get_translation_candidate(post.config, meta_path, lang)

with io.open(fname, 'r', encoding='utf-8') as fh:
meta = fh.readlines()

0 comments on commit 2a5db98

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