Skip to content
Permalink
Browse files

Making more future-proof (suggestion by @Kwpolska).

  • Loading branch information
felixfontein committed Dec 17, 2016
1 parent 8b193c7 commit e49fb3eecb1e731580fc3cef8ade08461c4c029c
Showing with 3 additions and 4 deletions.
  1. +3 −4 nikola/utils.py
@@ -1944,12 +1944,11 @@ def load_data(path):
return loader.load(inf)


# http://stackoverflow.com/a/2087433
if sys.version_info[0] == 3 and sys.version_info[1] >= 4:
# see http://stackoverflow.com/a/2087433
try:
import html # Python 3.4 and newer

html_unescape = html.unescape
else:
except (AttributeError, ImportError):
try:
from HTMLParser import HTMLParser # Python 2.6 and 2.7
except ImportError:

0 comments on commit e49fb3e

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