Skip to content
Permalink
Browse files
Merge pull request #1824 from getnikola/fix-1823
Fix part of 1823
  • Loading branch information
Kwpolska committed Jun 30, 2015
2 parents f330a1c + 93591bb commit 5a7a9e8bd9415681c0097fff7f8406bff21d4932
Showing with 9 additions and 9 deletions.
  1. +1 −0 CHANGES.txt
  2. +2 −2 nikola/__main__.py
  3. +5 −6 nikola/nikola.py
  4. +1 −1 nikola/plugins/command/import_wordpress.py
@@ -23,6 +23,7 @@ Features
Bugfixes
--------

* Read configuration when importing into an existing site (Issue #1823)
* Don’t crash on non-UTF-8 files during sitemap generation (Issue #1842)
* Unnecessary rebuilds of yearly archives (Issue #1833)
* Quietly ignore non-existent files in ``nikola check -l`` (Issue #1831)
@@ -108,7 +108,8 @@ def main(args=None):
root = get_root_dir()
if root:
os.chdir(root)
needs_config_file = (argname != 'help')
# Help and imports don't require config, but can use one if it exists
needs_config_file = (argname != 'help') and not argname.startswith('import_')
else:
needs_config_file = False

@@ -154,7 +155,6 @@ def main(args=None):
config['__quiet__'] = quiet
config['__configuration_filename__'] = conf_filename
config['__cwd__'] = original_cwd

site = Nikola(**config)
DN = DoitNikola(site, quiet)
if _RETURN_DOITNIKOLA:
@@ -615,12 +615,11 @@ def __init__(self, **config):
self.default_lang = self.config['DEFAULT_LANG']
self.translations = self.config['TRANSLATIONS']

if self.configured:
locale_fallback, locale_default, locales = sanitized_locales(
self.config.get('LOCALE_FALLBACK', None),
self.config.get('LOCALE_DEFAULT', None),
self.config.get('LOCALES', {}), self.translations)
utils.LocaleBorg.initialize(locales, self.default_lang)
locale_fallback, locale_default, locales = sanitized_locales(
self.config.get('LOCALE_FALLBACK', None),
self.config.get('LOCALE_DEFAULT', None),
self.config.get('LOCALES', {}), self.translations)
utils.LocaleBorg.initialize(locales, self.default_lang)

# BASE_URL defaults to SITE_URL
if 'BASE_URL' not in self.config:
@@ -184,7 +184,7 @@ def show_info_about_mising_module(modulename):

# Add tag redirects
for tag in self.all_tags:
tag = utils.slugify(tag.decode('utf8'))
tag = tag.decode('utf8')
src_url = '{}tag/{}'.format(self.context['SITE_URL'], tag)
dst_url = self.site.link('tag', tag)
if src_url != dst_url:

0 comments on commit 5a7a9e8

Please sign in to comment.