Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing themes does not work in Python 2.6 #1298

Closed
svisser opened this issue May 24, 2014 · 1 comment
Closed

Installing themes does not work in Python 2.6 #1298

svisser opened this issue May 24, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@svisser
Copy link

svisser commented May 24, 2014

Installing a theme fails in Python 2.6 as instances of ZipFile do not have an __exit__ attribute. Example:

nikola install_theme zen-jinja

fails with:

  File "/home/simeon/.virtualenvs/site/lib/python2.6/site-packages/nikola/plugins/command/install_theme.py", line 121, in _execute
    installstatus = self.do_install(name, data)
  File "/home/simeon/.virtualenvs/site/lib/python2.6/site-packages/nikola/plugins/command/install_theme.py", line 143, in do_install
    utils.extract_all(zip_file)
  File "/home/simeon/.virtualenvs/site/lib/python2.6/site-packages/nikola/utils.py", line 725, in extract_all
    with zip(zipfile) as z:
AttributeError: ZipFile instance has no attribute '__exit__'

This can be confirmed in the docs as the ability to use ZipFile as context manager was added in Python 2.7: https://docs.python.org/2/library/zipfile.html.

I am using Nikola 7.0.0.

@Kwpolska Kwpolska added the bug label May 24, 2014
@Kwpolska Kwpolska added this to the v7.0.1 milestone May 24, 2014
@Kwpolska Kwpolska self-assigned this May 24, 2014
@Kwpolska
Copy link
Member

Fix upcoming.

Kwpolska added a commit that referenced this issue May 24, 2014
Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Kwpolska added a commit that referenced this issue May 24, 2014
fix #1298 -- fix plugin/theme install under py2.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants