mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Update Mako-1.1.5
This commit is contained in:
parent
4eb0fea423
commit
668f6bfbb8
5 changed files with 28 additions and 12 deletions
|
@ -27,7 +27,15 @@ class LinguaMakoExtractor(Extractor, MessageExtractor):
|
|||
self.python_extractor = get_extractor("x.py")
|
||||
if fileobj is None:
|
||||
fileobj = open(filename, "rb")
|
||||
return self.process_file(fileobj)
|
||||
must_close = True
|
||||
else:
|
||||
must_close = False
|
||||
try:
|
||||
for message in self.process_file(fileobj):
|
||||
yield message
|
||||
finally:
|
||||
if must_close:
|
||||
fileobj.close()
|
||||
|
||||
def process_python(self, code, code_lineno, translator_strings):
|
||||
source = code.getvalue().strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue