mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 07:38:21 +00:00
Bug fix: include 'emap' attribute in UniConvScript
Fixes an AttributeError: 'UniConvScript' object has no attribute 'emap'
This commit is contained in:
parent
8cfcdd090a
commit
2ade2804df
1 changed files with 4 additions and 2 deletions
6
main.py
6
main.py
|
@ -67,9 +67,10 @@ class UniConvScript(object):
|
|||
"""Converts the script to Unicode, setting the properties required by
|
||||
EParse to report a meaningful error position.
|
||||
"""
|
||||
def __init__(self, script, options = (), filename = b'<stdin>'):
|
||||
def __init__(self, script, options=(), filename=b'<stdin>', emap=False):
|
||||
self.linedir = []
|
||||
self.filename = filename
|
||||
self.emap = emap
|
||||
# We don't interpret #line here. In case of an encode error,
|
||||
# we're in the dark about which file it comes from. User needs
|
||||
# --preshow to view the #line directives and find the correspondence
|
||||
|
@ -647,7 +648,8 @@ def main(argv):
|
|||
# errors with accurate line information. At this point we don't
|
||||
# need the result.
|
||||
UniConvScript(script, options,
|
||||
fname if fname != '-' else '<stdin>').to_unicode()
|
||||
fname if fname != '-' else '<stdin>',
|
||||
emap).to_unicode()
|
||||
except EParse as e:
|
||||
# We don't call ReportError to prevent problems due to
|
||||
# displaying invalid UTF-8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue