Skip to content

Commit

Permalink
Making more future-proof (suggestion by @Kwpolska).
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Dec 17, 2016
1 parent 8b193c7 commit e49fb3e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nikola/utils.py
Expand Up @@ -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:
Expand Down

0 comments on commit e49fb3e

Please sign in to comment.