mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
Handle truncated files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10140 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
38801aed7f
commit
178897b091
@ -1,3 +1,8 @@
|
||||
2005-07-06 José Matos <jamatos@lyx.org>
|
||||
|
||||
* LyX.py (warning): Prefix warnings with label "Warning: ".
|
||||
* lyx_1_4.lyx (add_end_layout): Handle truncated files.
|
||||
|
||||
2005-07-06 José Matos <jamatos@lyx.org>
|
||||
|
||||
* lyx_1_4.lyx (convert_paperpackage): older tex2lyx generated files
|
||||
|
@ -118,7 +118,7 @@ class LyX_Base:
|
||||
def warning(self, message, debug_level= default_debug_level):
|
||||
" Emits warning to self.error, if the debug_level is less than the self.debug."
|
||||
if debug_level <= self.debug:
|
||||
self.err.write(message + "\n")
|
||||
self.err.write("Warning: " + message + "\n")
|
||||
|
||||
|
||||
def error(self, message):
|
||||
|
@ -304,7 +304,13 @@ def add_end_layout(file):
|
||||
i = find_tokens(file.body, ["\\begin_inset", "\\end_inset", "\\layout",
|
||||
"\\begin_deeper", "\\end_deeper", "\\the_end"], i)
|
||||
|
||||
token = split(file.body[i])[0]
|
||||
if i != -1:
|
||||
token = split(file.body[i])[0]
|
||||
else:
|
||||
file.warning("Truncated file.")
|
||||
i = len(file.body)
|
||||
file.body.insert(i, '\\the_end')
|
||||
token = ""
|
||||
|
||||
if token == "\\begin_inset":
|
||||
struct_stack.append(token)
|
||||
|
Loading…
Reference in New Issue
Block a user