Skip to content

Commit

Permalink
str.rsplit() cannot use kwargs in py2k
Browse files Browse the repository at this point in the history
We just need to use maxsplit as a positional argument to make everyone happy.

cc @Aeyoun

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 4, 2015
1 parent a829e75 commit 803cbb6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/crumbs.tmpl
Expand Up @@ -7,7 +7,7 @@
{% for link, text in crumbs %}
{% if text != index_file %}
{% if link == '#' %}
<li>{{ text.rsplit('.html', maxsplit=1)[0] }}</li>
<li>{{ text.rsplit('.html', 1)[0] }}</li>
{% else %}
<li><a href="{{ link }}">{{ text }}</a></li>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base/templates/crumbs.tmpl
Expand Up @@ -7,7 +7,7 @@
% for link, text in crumbs:
% if text != index_file:
% if link == '#':
<li>${text.rsplit('.html', maxsplit=1)[0]}</li>
<li>${text.rsplit('.html', 1)[0]}</li>
% else:
<li><a href="${link}">${text}</a></li>
% endif
Expand Down
1 change: 1 addition & 0 deletions requirements-tests.txt
Expand Up @@ -5,3 +5,4 @@ pytest==2.7.1
pytest-cov==1.8.1
freezegun==0.3.3
python-coveralls==2.5.0
colorama==0.3.3
2 changes: 1 addition & 1 deletion scripts/jinjify.py
Expand Up @@ -78,7 +78,7 @@ def jinjify(in_theme, out_theme):
parent = mappings[child]

with io.open(os.path.join(out_theme, "parent"), "w+", encoding='utf-8') as outf:
outf.write(u'{0}\n'.format(parent)
outf.write(u'{0}\n'.format(parent))

with io.open(os.path.join(out_theme, "engine"), "w+", encoding='utf-8') as outf:
outf.write(u"jinja\n")
Expand Down

0 comments on commit 803cbb6

Please sign in to comment.