mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Update mako to 1.1.2
This commit is contained in:
parent
843a400b2d
commit
4564623884
27 changed files with 53 additions and 112 deletions
|
@ -1,9 +1,11 @@
|
|||
# mako/util.py
|
||||
# Copyright 2006-2019 the Mako authors and contributors <see AUTHORS file>
|
||||
# Copyright 2006-2020 the Mako authors and contributors <see AUTHORS file>
|
||||
#
|
||||
# This module is part of Mako and is released under
|
||||
# the MIT License: http://www.opensource.org/licenses/mit-license.php
|
||||
from __future__ import absolute_import
|
||||
|
||||
from ast import parse
|
||||
import codecs
|
||||
import collections
|
||||
import operator
|
||||
|
@ -257,9 +259,7 @@ def parse_encoding(fp):
|
|||
m = _PYTHON_MAGIC_COMMENT_re.match(line1.decode("ascii", "ignore"))
|
||||
if not m:
|
||||
try:
|
||||
import parser
|
||||
|
||||
parser.suite(line1.decode("ascii", "ignore"))
|
||||
parse(line1.decode("ascii", "ignore"))
|
||||
except (ImportError, SyntaxError):
|
||||
# Either it's a real syntax error, in which case the source
|
||||
# is not valid python source, or line2 is a continuation of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue