mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Do not crash if the input file does not exist, instead warn and exit (fixes https://bugzilla.redhat.com/show_bug.cgi?id=595618)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37937 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
101cabc355
commit
89bf17bfec
@ -54,6 +54,8 @@ def main(argv):
|
||||
latex_base, latex_ext = os.path.splitext(latex_file)
|
||||
|
||||
# Read the input file and write the output file
|
||||
if(not os.path.isfile(abs_from_file)):
|
||||
error("%s is not a valid file.\n" % abs_from_file)
|
||||
from_file = open(abs_from_file, 'rb')
|
||||
to_file = open(abs_to_file, 'wb')
|
||||
lines = from_file.readlines()
|
||||
|
Loading…
Reference in New Issue
Block a user